All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] media: exynos-gsc: fix return code if mutex was interrupted
@ 2018-08-08 14:52 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 13+ messages in thread
From: Mauro Carvalho Chehab @ 2018-08-08 14:52 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab, Kukjin Kim, Krzysztof Kozlowski,
	Sylwester Nawrocki, Hans Verkuil, Al Viro, Marek Szyprowski,
	Julia Lawall, linux-arm-kernel, linux-samsung-soc

All poll routines expect a poll flag, and not error codes. So,
instead of returning -ERESTARTSYS if the mutex got interrupted,
return EPOLERR, just like the V4L2 VB2 code.

Solves this sparce warning:
	drivers/media/platform/exynos-gsc/gsc-m2m.c:716:24: warning: incorrect type in return expression (different base types)
	drivers/media/platform/exynos-gsc/gsc-m2m.c:716:24:    expected restricted __poll_t
	drivers/media/platform/exynos-gsc/gsc-m2m.c:716:24:    got int

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 drivers/media/platform/exynos-gsc/gsc-m2m.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/exynos-gsc/gsc-m2m.c b/drivers/media/platform/exynos-gsc/gsc-m2m.c
index e9ff27949a91..c9d2f6c5311a 100644
--- a/drivers/media/platform/exynos-gsc/gsc-m2m.c
+++ b/drivers/media/platform/exynos-gsc/gsc-m2m.c
@@ -713,7 +713,7 @@ static __poll_t gsc_m2m_poll(struct file *file,
 	__poll_t ret;
 
 	if (mutex_lock_interruptible(&gsc->lock))
-		return -ERESTARTSYS;
+		return EPOLLERR;
 
 	ret = v4l2_m2m_poll(file, ctx->m2m_ctx, wait);
 	mutex_unlock(&gsc->lock);
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 1/6] media: exynos-gsc: fix return code if mutex was interrupted
@ 2018-08-08 14:52 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 13+ messages in thread
From: Mauro Carvalho Chehab @ 2018-08-08 14:52 UTC (permalink / raw)
  Cc: linux-samsung-soc, Krzysztof Kozlowski, Mauro Carvalho Chehab,
	Julia Lawall, Kukjin Kim, Hans Verkuil, Al Viro,
	Sylwester Nawrocki, Mauro Carvalho Chehab, Marek Szyprowski,
	linux-arm-kernel, Linux Media Mailing List

All poll routines expect a poll flag, and not error codes. So,
instead of returning -ERESTARTSYS if the mutex got interrupted,
return EPOLERR, just like the V4L2 VB2 code.

Solves this sparce warning:
	drivers/media/platform/exynos-gsc/gsc-m2m.c:716:24: warning: incorrect type in return expression (different base types)
	drivers/media/platform/exynos-gsc/gsc-m2m.c:716:24:    expected restricted __poll_t
	drivers/media/platform/exynos-gsc/gsc-m2m.c:716:24:    got int

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 drivers/media/platform/exynos-gsc/gsc-m2m.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/exynos-gsc/gsc-m2m.c b/drivers/media/platform/exynos-gsc/gsc-m2m.c
index e9ff27949a91..c9d2f6c5311a 100644
--- a/drivers/media/platform/exynos-gsc/gsc-m2m.c
+++ b/drivers/media/platform/exynos-gsc/gsc-m2m.c
@@ -713,7 +713,7 @@ static __poll_t gsc_m2m_poll(struct file *file,
 	__poll_t ret;
 
 	if (mutex_lock_interruptible(&gsc->lock))
-		return -ERESTARTSYS;
+		return EPOLLERR;
 
 	ret = v4l2_m2m_poll(file, ctx->m2m_ctx, wait);
 	mutex_unlock(&gsc->lock);
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 1/6] media: exynos-gsc: fix return code if mutex was interrupted
@ 2018-08-08 14:52 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 13+ messages in thread
From: Mauro Carvalho Chehab @ 2018-08-08 14:52 UTC (permalink / raw)
  To: linux-arm-kernel

All poll routines expect a poll flag, and not error codes. So,
instead of returning -ERESTARTSYS if the mutex got interrupted,
return EPOLERR, just like the V4L2 VB2 code.

Solves this sparce warning:
	drivers/media/platform/exynos-gsc/gsc-m2m.c:716:24: warning: incorrect type in return expression (different base types)
	drivers/media/platform/exynos-gsc/gsc-m2m.c:716:24:    expected restricted __poll_t
	drivers/media/platform/exynos-gsc/gsc-m2m.c:716:24:    got int

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 drivers/media/platform/exynos-gsc/gsc-m2m.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/exynos-gsc/gsc-m2m.c b/drivers/media/platform/exynos-gsc/gsc-m2m.c
index e9ff27949a91..c9d2f6c5311a 100644
--- a/drivers/media/platform/exynos-gsc/gsc-m2m.c
+++ b/drivers/media/platform/exynos-gsc/gsc-m2m.c
@@ -713,7 +713,7 @@ static __poll_t gsc_m2m_poll(struct file *file,
 	__poll_t ret;
 
 	if (mutex_lock_interruptible(&gsc->lock))
-		return -ERESTARTSYS;
+		return EPOLLERR;
 
 	ret = v4l2_m2m_poll(file, ctx->m2m_ctx, wait);
 	mutex_unlock(&gsc->lock);
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/6] media: saa7164: fix return codes for the polling routine
  2018-08-08 14:52 ` Mauro Carvalho Chehab
  (?)
  (?)
@ 2018-08-08 14:52 ` Mauro Carvalho Chehab
  -1 siblings, 0 replies; 13+ messages in thread
From: Mauro Carvalho Chehab @ 2018-08-08 14:52 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab, Al Viro

All poll handlers should return a poll flag, and not error codes. So,
instead of returning an error, do the right thing at saa7164,
e. g. to return EPOLERR on errors, just like the V4L2 VB2 code.

Solves the following sparse warnings:
    drivers/media/pci/saa7164/saa7164-vbi.c:632:24: warning: incorrect type in return expression (different base types)
    drivers/media/pci/saa7164/saa7164-vbi.c:632:24:    expected restricted __poll_t
    drivers/media/pci/saa7164/saa7164-vbi.c:632:24:    got int
    drivers/media/pci/saa7164/saa7164-vbi.c:637:40: warning: incorrect type in return expression (different base types)
    drivers/media/pci/saa7164/saa7164-vbi.c:637:40:    expected restricted __poll_t
    drivers/media/pci/saa7164/saa7164-vbi.c:637:40:    got int
    drivers/media/pci/saa7164/saa7164-vbi.c:647:40: warning: incorrect type in return expression (different base types)
    drivers/media/pci/saa7164/saa7164-vbi.c:647:40:    expected restricted __poll_t
    drivers/media/pci/saa7164/saa7164-vbi.c:647:40:    got int

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 drivers/media/pci/saa7164/saa7164-vbi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/pci/saa7164/saa7164-vbi.c b/drivers/media/pci/saa7164/saa7164-vbi.c
index 64ab91c24c18..221de91a8bae 100644
--- a/drivers/media/pci/saa7164/saa7164-vbi.c
+++ b/drivers/media/pci/saa7164/saa7164-vbi.c
@@ -629,12 +629,12 @@ static __poll_t fops_poll(struct file *file, poll_table *wait)
 		port->last_poll_msecs_diff);
 
 	if (!video_is_registered(port->v4l_device))
-		return -EIO;
+		return EPOLLERR;
 
 	if (atomic_cmpxchg(&fh->v4l_reading, 0, 1) == 0) {
 		if (atomic_inc_return(&port->v4l_reader_count) == 1) {
 			if (saa7164_vbi_initialize(port) < 0)
-				return -EINVAL;
+				return EPOLLERR;
 			saa7164_vbi_start_streaming(port);
 			msleep(200);
 		}
@@ -644,7 +644,7 @@ static __poll_t fops_poll(struct file *file, poll_table *wait)
 	if ((file->f_flags & O_NONBLOCK) == 0) {
 		if (wait_event_interruptible(port->wait_read,
 			saa7164_vbi_next_buf(port))) {
-				return -ERESTARTSYS;
+				return EPOLLERR;
 		}
 	}
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 3/6] media: s3c-camif: fix return code for the polling routine
  2018-08-08 14:52 ` Mauro Carvalho Chehab
                   ` (2 preceding siblings ...)
  (?)
@ 2018-08-08 14:52 ` Mauro Carvalho Chehab
  -1 siblings, 0 replies; 13+ messages in thread
From: Mauro Carvalho Chehab @ 2018-08-08 14:52 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab, Sylwester Nawrocki, linux-samsung-soc

All poll handlers should return a poll flag, and not error codes. So,
instead of returning an error, do the right thing here,
e. g. to return EPOLERR on errors, just like the V4L2 VB2 code.

Solves the following sparse warning:
    drivers/media/platform/s3c-camif/camif-capture.c:604:21: warning: incorrect type in assignment (different base types)
    drivers/media/platform/s3c-camif/camif-capture.c:604:21:    expected restricted __poll_t [usertype] ret
    drivers/media/platform/s3c-camif/camif-capture.c:604:21:    got int

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 drivers/media/platform/s3c-camif/camif-capture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/s3c-camif/camif-capture.c b/drivers/media/platform/s3c-camif/camif-capture.c
index b1d9f3857d3d..c02dce8b4c6c 100644
--- a/drivers/media/platform/s3c-camif/camif-capture.c
+++ b/drivers/media/platform/s3c-camif/camif-capture.c
@@ -601,7 +601,7 @@ static __poll_t s3c_camif_poll(struct file *file,
 
 	mutex_lock(&camif->lock);
 	if (vp->owner && vp->owner != file->private_data)
-		ret = -EBUSY;
+		ret = EPOLLERR;
 	else
 		ret = vb2_poll(&vp->vb_queue, file, wait);
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 4/6] media: radio-wl1273: fix return code for the polling routine
  2018-08-08 14:52 ` Mauro Carvalho Chehab
                   ` (3 preceding siblings ...)
  (?)
@ 2018-08-08 14:52 ` Mauro Carvalho Chehab
  -1 siblings, 0 replies; 13+ messages in thread
From: Mauro Carvalho Chehab @ 2018-08-08 14:52 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab, Al Viro, Bhumika Goyal, Alexey Klimov,
	Markus Elfring

All poll handlers should return a poll flag, and not error codes. So,
instead of returning an error, do the right thing here,
e. g. to return EPOLERR on errors, just like the V4L2 VB2 code.

Solves the following sparse warning:
    drivers/media/radio/radio-wl1273.c:1099:24: warning: incorrect type in return expression (different base types)
    drivers/media/radio/radio-wl1273.c:1099:24:    expected restricted __poll_t
    drivers/media/radio/radio-wl1273.c:1099:24:    got int

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 drivers/media/radio/radio-wl1273.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c
index 8f9f8dfc3497..11aa94f189cb 100644
--- a/drivers/media/radio/radio-wl1273.c
+++ b/drivers/media/radio/radio-wl1273.c
@@ -1096,7 +1096,7 @@ static __poll_t wl1273_fm_fops_poll(struct file *file,
 	struct wl1273_core *core = radio->core;
 
 	if (radio->owner && radio->owner != file)
-		return -EBUSY;
+		return EPOLLERR;
 
 	radio->owner = file;
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 5/6] media: isp: fix a warning about a wrong struct initializer
  2018-08-08 14:52 ` Mauro Carvalho Chehab
                   ` (4 preceding siblings ...)
  (?)
@ 2018-08-08 14:52 ` Mauro Carvalho Chehab
  2018-08-08 15:45   ` Laurent Pinchart
  -1 siblings, 1 reply; 13+ messages in thread
From: Mauro Carvalho Chehab @ 2018-08-08 14:52 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab, Laurent Pinchart

As sparse complains:
	drivers/media/platform/omap3isp/isp.c:303:39: warning: Using plain integer as NULL pointer

when a struct is initialized with { 0 }, actually the first
element of the struct is initialized with zeros, initializing the
other elements recursively. That can even generate gcc warnings
on nested structs.

So, instead, use the gcc-specific syntax for that (with is used
broadly inside the Kernel), initializing it with {};

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 drivers/media/platform/omap3isp/isp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
index 03354d513311..842e2235047d 100644
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -300,7 +300,7 @@ static struct clk *isp_xclk_src_get(struct of_phandle_args *clkspec, void *data)
 static int isp_xclk_init(struct isp_device *isp)
 {
 	struct device_node *np = isp->dev->of_node;
-	struct clk_init_data init = { 0 };
+	struct clk_init_data init = {};
 	unsigned int i;
 
 	for (i = 0; i < ARRAY_SIZE(isp->xclks); ++i)
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 6/6] siano: get rid of an unused return code for debugfs register
  2018-08-08 14:52 ` Mauro Carvalho Chehab
                   ` (5 preceding siblings ...)
  (?)
@ 2018-08-08 14:52 ` Mauro Carvalho Chehab
  -1 siblings, 0 replies; 13+ messages in thread
From: Mauro Carvalho Chehab @ 2018-08-08 14:52 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab, Al Viro

The siano's debugfs register logic is optional: it should be ok
if it fails. So, no need to check if debufs register succeeded.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 drivers/media/common/siano/smsdvb-debugfs.c | 10 +++++-----
 drivers/media/common/siano/smsdvb.h         |  7 ++-----
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/media/common/siano/smsdvb-debugfs.c b/drivers/media/common/siano/smsdvb-debugfs.c
index 40891f4f842b..c95d4583498e 100644
--- a/drivers/media/common/siano/smsdvb-debugfs.c
+++ b/drivers/media/common/siano/smsdvb-debugfs.c
@@ -500,7 +500,7 @@ void smsdvb_debugfs_release(struct smsdvb_client_t *client)
 	client->debugfs = NULL;
 }
 
-int smsdvb_debugfs_register(void)
+void smsdvb_debugfs_register(void)
 {
 	struct dentry *d;
 
@@ -517,15 +517,15 @@ int smsdvb_debugfs_register(void)
 	d = debugfs_create_dir("smsdvb", usb_debug_root);
 	if (IS_ERR_OR_NULL(d)) {
 		pr_err("Couldn't create sysfs node for smsdvb\n");
-		return PTR_ERR(d);
-	} else {
-		smsdvb_debugfs_usb_root = d;
+		return;
 	}
-	return 0;
+	smsdvb_debugfs_usb_root = d;
 }
 
 void smsdvb_debugfs_unregister(void)
 {
+	if (!smsdvb_debugfs_usb_root)
+		return;
 	debugfs_remove_recursive(smsdvb_debugfs_usb_root);
 	smsdvb_debugfs_usb_root = NULL;
 }
diff --git a/drivers/media/common/siano/smsdvb.h b/drivers/media/common/siano/smsdvb.h
index b15754d95ec0..befeb9817e54 100644
--- a/drivers/media/common/siano/smsdvb.h
+++ b/drivers/media/common/siano/smsdvb.h
@@ -107,7 +107,7 @@ struct RECEPTION_STATISTICS_PER_SLICES_S {
 
 int smsdvb_debugfs_create(struct smsdvb_client_t *client);
 void smsdvb_debugfs_release(struct smsdvb_client_t *client);
-int smsdvb_debugfs_register(void);
+void smsdvb_debugfs_register(void);
 void smsdvb_debugfs_unregister(void);
 
 #else
@@ -119,10 +119,7 @@ static inline int smsdvb_debugfs_create(struct smsdvb_client_t *client)
 
 static inline void smsdvb_debugfs_release(struct smsdvb_client_t *client) {}
 
-static inline int smsdvb_debugfs_register(void)
-{
-	return 0;
-};
+static inline void smsdvb_debugfs_register(void) {}
 
 static inline void smsdvb_debugfs_unregister(void) {};
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 5/6] media: isp: fix a warning about a wrong struct initializer
  2018-08-08 14:52 ` [PATCH 5/6] media: isp: fix a warning about a wrong struct initializer Mauro Carvalho Chehab
@ 2018-08-08 15:45   ` Laurent Pinchart
  2018-09-07 11:46     ` Laurent Pinchart
  0 siblings, 1 reply; 13+ messages in thread
From: Laurent Pinchart @ 2018-08-08 15:45 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List, Mauro Carvalho Chehab

Hi Mauro,

Thank you for the patch.

The subject line should be "media: omap3isp: ...".

On Wednesday, 8 August 2018 17:52:55 EEST Mauro Carvalho Chehab wrote:
> As sparse complains:
> 	drivers/media/platform/omap3isp/isp.c:303:39: warning: Using plain integer
> as NULL pointer
> 
> when a struct is initialized with { 0 }, actually the first
> element of the struct is initialized with zeros, initializing the
> other elements recursively. That can even generate gcc warnings
> on nested structs.
> 
> So, instead, use the gcc-specific syntax for that (with is used
> broadly inside the Kernel), initializing it with {};
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> ---
>  drivers/media/platform/omap3isp/isp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/omap3isp/isp.c
> b/drivers/media/platform/omap3isp/isp.c index 03354d513311..842e2235047d
> 100644
> --- a/drivers/media/platform/omap3isp/isp.c
> +++ b/drivers/media/platform/omap3isp/isp.c
> @@ -300,7 +300,7 @@ static struct clk *isp_xclk_src_get(struct
> of_phandle_args *clkspec, void *data) static int isp_xclk_init(struct
> isp_device *isp)
>  {
>  	struct device_node *np = isp->dev->of_node;
> -	struct clk_init_data init = { 0 };
> +	struct clk_init_data init = {};

How about = { NULL }; to avoid a gcc-specific syntax ?

>  	unsigned int i;
> 
>  	for (i = 0; i < ARRAY_SIZE(isp->xclks); ++i)

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 5/6] media: isp: fix a warning about a wrong struct initializer
  2018-08-08 15:45   ` Laurent Pinchart
@ 2018-09-07 11:46     ` Laurent Pinchart
  2018-09-11 15:30       ` Laurent Pinchart
  2018-09-20 14:44       ` Mauro Carvalho Chehab
  0 siblings, 2 replies; 13+ messages in thread
From: Laurent Pinchart @ 2018-09-07 11:46 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List, Mauro Carvalho Chehab

Hi Mauro,

As maintainers should be held to the same level of obligations as developers, 
and to avoid demotivating reviewers, could you handle comments you receive 
before pushing your own patches to your tree ? There should be no maintainer 
privilege here.

On Wednesday, 8 August 2018 18:45:49 EEST Laurent Pinchart wrote:
> Hi Mauro,
> 
> Thank you for the patch.
> 
> The subject line should be "media: omap3isp: ...".
> 
> On Wednesday, 8 August 2018 17:52:55 EEST Mauro Carvalho Chehab wrote:
> > As sparse complains:
> > 	drivers/media/platform/omap3isp/isp.c:303:39: warning: Using plain
> > 	integer
> > 
> > as NULL pointer
> > 
> > when a struct is initialized with { 0 }, actually the first
> > element of the struct is initialized with zeros, initializing the
> > other elements recursively. That can even generate gcc warnings
> > on nested structs.
> > 
> > So, instead, use the gcc-specific syntax for that (with is used
> > broadly inside the Kernel), initializing it with {};
> > 
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> > ---
> > 
> >  drivers/media/platform/omap3isp/isp.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/media/platform/omap3isp/isp.c
> > b/drivers/media/platform/omap3isp/isp.c index 03354d513311..842e2235047d
> > 100644
> > --- a/drivers/media/platform/omap3isp/isp.c
> > +++ b/drivers/media/platform/omap3isp/isp.c
> > @@ -300,7 +300,7 @@ static struct clk *isp_xclk_src_get(struct
> > of_phandle_args *clkspec, void *data) static int isp_xclk_init(struct
> > isp_device *isp)
> > 
> >  {
> >  
> >  	struct device_node *np = isp->dev->of_node;
> > 
> > -	struct clk_init_data init = { 0 };
> > +	struct clk_init_data init = {};
> 
> How about = { NULL }; to avoid a gcc-specific syntax ?
> 
> >  	unsigned int i;
> >  	
> >  	for (i = 0; i < ARRAY_SIZE(isp->xclks); ++i)


-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 5/6] media: isp: fix a warning about a wrong struct initializer
  2018-09-07 11:46     ` Laurent Pinchart
@ 2018-09-11 15:30       ` Laurent Pinchart
  2018-09-20 14:44       ` Mauro Carvalho Chehab
  1 sibling, 0 replies; 13+ messages in thread
From: Laurent Pinchart @ 2018-09-11 15:30 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List, Mauro Carvalho Chehab

Hi Mauro,

On Friday, 7 September 2018 14:46:34 EEST Laurent Pinchart wrote:
> Hi Mauro,
> 
> As maintainers should be held to the same level of obligations as
> developers, and to avoid demotivating reviewers, could you handle comments
> you receive before pushing your own patches to your tree ? There should be
> no maintainer privilege here.

Ping ?

> On Wednesday, 8 August 2018 18:45:49 EEST Laurent Pinchart wrote:
> > Hi Mauro,
> > 
> > Thank you for the patch.
> > 
> > The subject line should be "media: omap3isp: ...".
> > 
> > On Wednesday, 8 August 2018 17:52:55 EEST Mauro Carvalho Chehab wrote:
> >> As sparse complains:
> >> 	drivers/media/platform/omap3isp/isp.c:303:39: warning: Using plain
> >> 	integer as NULL pointer
> >> 
> >> when a struct is initialized with { 0 }, actually the first
> >> element of the struct is initialized with zeros, initializing the
> >> other elements recursively. That can even generate gcc warnings
> >> on nested structs.
> >> 
> > > So, instead, use the gcc-specific syntax for that (with is used
> >> broadly inside the Kernel), initializing it with {};
> >> 
> >> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> >> ---
> >> 
> >>  drivers/media/platform/omap3isp/isp.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >> 
> >> diff --git a/drivers/media/platform/omap3isp/isp.c
> >> b/drivers/media/platform/omap3isp/isp.c index 03354d513311..842e2235047d
> >> 100644
> >> --- a/drivers/media/platform/omap3isp/isp.c
> >> +++ b/drivers/media/platform/omap3isp/isp.c
> >> @@ -300,7 +300,7 @@ static struct clk *isp_xclk_src_get(struct
> >> of_phandle_args *clkspec, void *data)
> >>  static int isp_xclk_init(struct isp_device *isp)
> >>  {
> >>  	struct device_node *np = isp->dev->of_node;
> >> -	struct clk_init_data init = { 0 };
> >> +	struct clk_init_data init = {};
> > 
> > How about = { NULL }; to avoid a gcc-specific syntax ?
> > 
> >>  	unsigned int i;
> >>  	
> >>  	for (i = 0; i < ARRAY_SIZE(isp->xclks); ++i)

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 5/6] media: isp: fix a warning about a wrong struct initializer
  2018-09-07 11:46     ` Laurent Pinchart
  2018-09-11 15:30       ` Laurent Pinchart
@ 2018-09-20 14:44       ` Mauro Carvalho Chehab
  2018-09-20 17:20         ` Laurent Pinchart
  1 sibling, 1 reply; 13+ messages in thread
From: Mauro Carvalho Chehab @ 2018-09-20 14:44 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: Linux Media Mailing List, Mauro Carvalho Chehab

Em Fri, 07 Sep 2018 14:46:34 +0300
Laurent Pinchart <laurent.pinchart@ideasonboard.com> escreveu:

> Hi Mauro,
> 
> As maintainers should be held to the same level of obligations as developers, 
> and to avoid demotivating reviewers, could you handle comments you receive 
> before pushing your own patches to your tree ? There should be no maintainer 
> privilege here.

Sorry, yeah, this was improperly handled. Not sure what happened.

From whatever reason, I ended by mishandling this and lost the
related emails. I had to do several e-mail changes at the beginning
of August, as I'm not using s-opensource.com anymore, and had to
reconfigure my inbox handling logic.

Do you want me to revert the patch?

> 
> On Wednesday, 8 August 2018 18:45:49 EEST Laurent Pinchart wrote:
> > Hi Mauro,
> > 
> > Thank you for the patch.
> > 
> > The subject line should be "media: omap3isp: ...".
> > 
> > On Wednesday, 8 August 2018 17:52:55 EEST Mauro Carvalho Chehab wrote:  
> > > As sparse complains:
> > > 	drivers/media/platform/omap3isp/isp.c:303:39: warning: Using plain
> > > 	integer
> > > 
> > > as NULL pointer
> > > 
> > > when a struct is initialized with { 0 }, actually the first
> > > element of the struct is initialized with zeros, initializing the
> > > other elements recursively. That can even generate gcc warnings
> > > on nested structs.
> > > 
> > > So, instead, use the gcc-specific syntax for that (with is used
> > > broadly inside the Kernel), initializing it with {};
> > > 
> > > Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> > > ---
> > > 
> > >  drivers/media/platform/omap3isp/isp.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/media/platform/omap3isp/isp.c
> > > b/drivers/media/platform/omap3isp/isp.c index 03354d513311..842e2235047d
> > > 100644
> > > --- a/drivers/media/platform/omap3isp/isp.c
> > > +++ b/drivers/media/platform/omap3isp/isp.c
> > > @@ -300,7 +300,7 @@ static struct clk *isp_xclk_src_get(struct
> > > of_phandle_args *clkspec, void *data) static int isp_xclk_init(struct
> > > isp_device *isp)
> > > 
> > >  {
> > >  
> > >  	struct device_node *np = isp->dev->of_node;
> > > 
> > > -	struct clk_init_data init = { 0 };
> > > +	struct clk_init_data init = {};  
> > 
> > How about = { NULL }; to avoid a gcc-specific syntax ?
> >   
> > >  	unsigned int i;
> > >  	
> > >  	for (i = 0; i < ARRAY_SIZE(isp->xclks); ++i)  
> 
> 



Thanks,
Mauro

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 5/6] media: isp: fix a warning about a wrong struct initializer
  2018-09-20 14:44       ` Mauro Carvalho Chehab
@ 2018-09-20 17:20         ` Laurent Pinchart
  0 siblings, 0 replies; 13+ messages in thread
From: Laurent Pinchart @ 2018-09-20 17:20 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List, Mauro Carvalho Chehab

Hi Mauro,

On Thursday, 20 September 2018 17:44:53 EEST Mauro Carvalho Chehab wrote:
> Em Fri, 07 Sep 2018 14:46:34 +0300 Laurent Pinchart escreveu:
> > Hi Mauro,
> > 
> > As maintainers should be held to the same level of obligations as
> > developers, and to avoid demotivating reviewers, could you handle
> > comments you receive before pushing your own patches to your tree ? There
> > should be no maintainer privilege here.
> 
> Sorry, yeah, this was improperly handled. Not sure what happened.
> 
> From whatever reason, I ended by mishandling this and lost the
> related emails. I had to do several e-mail changes at the beginning
> of August, as I'm not using s-opensource.com anymore, and had to
> reconfigure my inbox handling logic.

Thank you for the explanation.

> Do you want me to revert the patch?

I appreciate the proposal, but there's no need to :-) It's not a big issue, I 
could easily submit a follow-up patch, but even that isn't really needed. My 
main concern was the lack of reaction to the review, and now that this has be 
cleared, the issue is closed for me.

> > On Wednesday, 8 August 2018 18:45:49 EEST Laurent Pinchart wrote:
> > > Hi Mauro,
> > > 
> > > Thank you for the patch.
> > > 
> > > The subject line should be "media: omap3isp: ...".
> > > 
> > > On Wednesday, 8 August 2018 17:52:55 EEST Mauro Carvalho Chehab wrote:
> > > > As sparse complains:
> > > > 	drivers/media/platform/omap3isp/isp.c:303:39: warning: Using plain
> > > > 	integer
> > > > 
> > > > as NULL pointer
> > > > 
> > > > when a struct is initialized with { 0 }, actually the first
> > > > element of the struct is initialized with zeros, initializing the
> > > > other elements recursively. That can even generate gcc warnings
> > > > on nested structs.
> > > > 
> > > > So, instead, use the gcc-specific syntax for that (with is used
> > > > broadly inside the Kernel), initializing it with {};
> > > > 
> > > > Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> > > > ---
> > > > 
> > > >  drivers/media/platform/omap3isp/isp.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/media/platform/omap3isp/isp.c
> > > > b/drivers/media/platform/omap3isp/isp.c index
> > > > 03354d513311..842e2235047d
> > > > 100644
> > > > --- a/drivers/media/platform/omap3isp/isp.c
> > > > +++ b/drivers/media/platform/omap3isp/isp.c
> > > > @@ -300,7 +300,7 @@ static struct clk *isp_xclk_src_get(struct
> > > > of_phandle_args *clkspec, void *data) static int isp_xclk_init(struct
> > > > isp_device *isp)
> > > > 
> > > >  {
> > > >  
> > > >  	struct device_node *np = isp->dev->of_node;
> > > > 
> > > > -	struct clk_init_data init = { 0 };
> > > > +	struct clk_init_data init = {};
> > > 
> > > How about = { NULL }; to avoid a gcc-specific syntax ?
> > > 
> > > >  	unsigned int i;
> > > >  	
> > > >  	for (i = 0; i < ARRAY_SIZE(isp->xclks); ++i)
> 
> Thanks,
> Mauro


-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-09-20 23:04 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08 14:52 [PATCH 1/6] media: exynos-gsc: fix return code if mutex was interrupted Mauro Carvalho Chehab
2018-08-08 14:52 ` Mauro Carvalho Chehab
2018-08-08 14:52 ` Mauro Carvalho Chehab
2018-08-08 14:52 ` [PATCH 2/6] media: saa7164: fix return codes for the polling routine Mauro Carvalho Chehab
2018-08-08 14:52 ` [PATCH 3/6] media: s3c-camif: fix return code " Mauro Carvalho Chehab
2018-08-08 14:52 ` [PATCH 4/6] media: radio-wl1273: " Mauro Carvalho Chehab
2018-08-08 14:52 ` [PATCH 5/6] media: isp: fix a warning about a wrong struct initializer Mauro Carvalho Chehab
2018-08-08 15:45   ` Laurent Pinchart
2018-09-07 11:46     ` Laurent Pinchart
2018-09-11 15:30       ` Laurent Pinchart
2018-09-20 14:44       ` Mauro Carvalho Chehab
2018-09-20 17:20         ` Laurent Pinchart
2018-08-08 14:52 ` [PATCH 6/6] siano: get rid of an unused return code for debugfs register Mauro Carvalho Chehab

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.