* [PATCH 0/2] zoran: sparse/smatch fixes @ 2020-09-28 13:28 Hans Verkuil 2020-09-28 13:28 ` [PATCH 1/2] zoran: fix smatch warning Hans Verkuil 2020-09-28 13:28 ` [PATCH 2/2] zoran: fix sparse warnings Hans Verkuil 0 siblings, 2 replies; 6+ messages in thread From: Hans Verkuil @ 2020-09-28 13:28 UTC (permalink / raw) To: linux-media; +Cc: Corentin Labbe Two patches on top of Corentine's patch series: '[PATCH RFT/RFC v2 00/47] staging: media: bring back zoran driver' This fixes smatch and sparse warnings and will be added to the upcoming PR. Regards, Hans Hans Verkuil (2): zoran: fix smatch warning zoran: fix sparse warnings drivers/staging/media/zoran/zoran_device.c | 8 ++++---- drivers/staging/media/zoran/zoran_driver.c | 15 +++++++-------- 2 files changed, 11 insertions(+), 12 deletions(-) -- 2.28.0 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] zoran: fix smatch warning 2020-09-28 13:28 [PATCH 0/2] zoran: sparse/smatch fixes Hans Verkuil @ 2020-09-28 13:28 ` Hans Verkuil 2020-10-02 7:29 ` LABBE Corentin 2020-09-28 13:28 ` [PATCH 2/2] zoran: fix sparse warnings Hans Verkuil 1 sibling, 1 reply; 6+ messages in thread From: Hans Verkuil @ 2020-09-28 13:28 UTC (permalink / raw) To: linux-media; +Cc: Corentin Labbe, Hans Verkuil drivers/staging/media/zoran/zoran_device.c:941 zoran_irq() warn: inconsistent indenting Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> --- drivers/staging/media/zoran/zoran_device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/zoran/zoran_device.c b/drivers/staging/media/zoran/zoran_device.c index 1fe91e16658b..ecd6c5293a87 100644 --- a/drivers/staging/media/zoran/zoran_device.c +++ b/drivers/staging/media/zoran/zoran_device.c @@ -938,10 +938,10 @@ irqreturn_t zoran_irq(int irq, void *dev_id) pci_err(zr->pci_dev, "JPG IRQ when not in good mode\n"); return IRQ_HANDLED; } - zr->frame_num++; - zoran_reap_stat_com(zr); - zoran_feed_stat_com(zr); - return IRQ_HANDLED; + zr->frame_num++; + zoran_reap_stat_com(zr); + zoran_feed_stat_com(zr); + return IRQ_HANDLED; } /* unused interrupts */ } -- 2.28.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] zoran: fix smatch warning 2020-09-28 13:28 ` [PATCH 1/2] zoran: fix smatch warning Hans Verkuil @ 2020-10-02 7:29 ` LABBE Corentin 0 siblings, 0 replies; 6+ messages in thread From: LABBE Corentin @ 2020-10-02 7:29 UTC (permalink / raw) To: Hans Verkuil; +Cc: linux-media On Mon, Sep 28, 2020 at 03:28:30PM +0200, Hans Verkuil wrote: > drivers/staging/media/zoran/zoran_device.c:941 zoran_irq() warn: inconsistent indenting > > Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> > --- > drivers/staging/media/zoran/zoran_device.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/media/zoran/zoran_device.c b/drivers/staging/media/zoran/zoran_device.c > index 1fe91e16658b..ecd6c5293a87 100644 > --- a/drivers/staging/media/zoran/zoran_device.c > +++ b/drivers/staging/media/zoran/zoran_device.c > @@ -938,10 +938,10 @@ irqreturn_t zoran_irq(int irq, void *dev_id) > pci_err(zr->pci_dev, "JPG IRQ when not in good mode\n"); > return IRQ_HANDLED; > } > - zr->frame_num++; > - zoran_reap_stat_com(zr); > - zoran_feed_stat_com(zr); > - return IRQ_HANDLED; > + zr->frame_num++; > + zoran_reap_stat_com(zr); > + zoran_feed_stat_com(zr); > + return IRQ_HANDLED; > } > /* unused interrupts */ > } > -- > 2.28.0 > Hello Acked-by: Corentin Labbe <clabbe@baylibre.com> Thanks ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] zoran: fix sparse warnings 2020-09-28 13:28 [PATCH 0/2] zoran: sparse/smatch fixes Hans Verkuil 2020-09-28 13:28 ` [PATCH 1/2] zoran: fix smatch warning Hans Verkuil @ 2020-09-28 13:28 ` Hans Verkuil 2020-10-02 7:29 ` LABBE Corentin 1 sibling, 1 reply; 6+ messages in thread From: Hans Verkuil @ 2020-09-28 13:28 UTC (permalink / raw) To: linux-media; +Cc: Corentin Labbe, Hans Verkuil The output is not fully supported yet, so some ops are commented out. Also comment out the corresponding callbacks to prevent these sparse warnings: drivers/staging/media/zoran/zoran_driver.c:656:12: warning: 'zoran_s_output' defined but not used [-Wunused-function] 656 | static int zoran_s_output(struct file *file, void *__fh, unsigned int output) | ^~~~~~~~~~~~~~ drivers/staging/media/zoran/zoran_driver.c:649:12: warning: 'zoran_g_output' defined but not used [-Wunused-function] 649 | static int zoran_g_output(struct file *file, void *__fh, unsigned int *output) | ^~~~~~~~~~~~~~ drivers/staging/media/zoran/zoran_driver.c:635:12: warning: 'zoran_enum_output' defined but not used [-Wunused-function] 635 | static int zoran_enum_output(struct file *file, void *__fh, | ^~~~~~~~~~~~~~~~~ drivers/staging/media/zoran/zoran_driver.c:302:12: warning: 'zoran_enum_fmt_vid_overlay' defined but not used [-Wunused-function] 302 | static int zoran_enum_fmt_vid_overlay(struct file *file, void *__fh, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging/media/zoran/zoran_driver.c:294:12: warning: 'zoran_enum_fmt_vid_out' defined but not used [-Wunused-function] 294 | static int zoran_enum_fmt_vid_out(struct file *file, void *__fh, | ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> --- drivers/staging/media/zoran/zoran_driver.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/staging/media/zoran/zoran_driver.c b/drivers/staging/media/zoran/zoran_driver.c index c5b2ccb00ca9..9ea8ec3ef289 100644 --- a/drivers/staging/media/zoran/zoran_driver.c +++ b/drivers/staging/media/zoran/zoran_driver.c @@ -291,6 +291,8 @@ static int zoran_enum_fmt_vid_cap(struct file *file, void *__fh, return zoran_enum_fmt(zr, f, ZORAN_FORMAT_CAPTURE); } +#if 0 +/* TODO: output does not work yet */ static int zoran_enum_fmt_vid_out(struct file *file, void *__fh, struct v4l2_fmtdesc *f) { @@ -298,14 +300,7 @@ static int zoran_enum_fmt_vid_out(struct file *file, void *__fh, return zoran_enum_fmt(zr, f, ZORAN_FORMAT_PLAYBACK); } - -static int zoran_enum_fmt_vid_overlay(struct file *file, void *__fh, - struct v4l2_fmtdesc *f) -{ - struct zoran *zr = video_drvdata(file); - - return zoran_enum_fmt(zr, f, ZORAN_FORMAT_OVERLAY); -} +#endif static int zoran_g_fmt_vid_out(struct file *file, void *__fh, struct v4l2_format *fmt) @@ -632,6 +627,8 @@ static int zoran_s_input(struct file *file, void *__fh, unsigned int input) return res; } +#if 0 +/* TODO: output does not work yet */ static int zoran_enum_output(struct file *file, void *__fh, struct v4l2_output *outp) { @@ -660,6 +657,8 @@ static int zoran_s_output(struct file *file, void *__fh, unsigned int output) return 0; } +#endif + /* cropping (sub-frame capture) */ static int zoran_g_selection(struct file *file, void *__fh, struct v4l2_selection *sel) { -- 2.28.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] zoran: fix sparse warnings 2020-09-28 13:28 ` [PATCH 2/2] zoran: fix sparse warnings Hans Verkuil @ 2020-10-02 7:29 ` LABBE Corentin 2020-10-02 9:05 ` Mauro Carvalho Chehab 0 siblings, 1 reply; 6+ messages in thread From: LABBE Corentin @ 2020-10-02 7:29 UTC (permalink / raw) To: Hans Verkuil; +Cc: linux-media On Mon, Sep 28, 2020 at 03:28:31PM +0200, Hans Verkuil wrote: > The output is not fully supported yet, so some ops are > commented out. Also comment out the corresponding callbacks to prevent > these sparse warnings: > > drivers/staging/media/zoran/zoran_driver.c:656:12: warning: 'zoran_s_output' defined but not used [-Wunused-function] > 656 | static int zoran_s_output(struct file *file, void *__fh, unsigned int output) > | ^~~~~~~~~~~~~~ > drivers/staging/media/zoran/zoran_driver.c:649:12: warning: 'zoran_g_output' defined but not used [-Wunused-function] > 649 | static int zoran_g_output(struct file *file, void *__fh, unsigned int *output) > | ^~~~~~~~~~~~~~ > drivers/staging/media/zoran/zoran_driver.c:635:12: warning: 'zoran_enum_output' defined but not used [-Wunused-function] > 635 | static int zoran_enum_output(struct file *file, void *__fh, > | ^~~~~~~~~~~~~~~~~ > drivers/staging/media/zoran/zoran_driver.c:302:12: warning: 'zoran_enum_fmt_vid_overlay' defined but not used [-Wunused-function] > 302 | static int zoran_enum_fmt_vid_overlay(struct file *file, void *__fh, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/staging/media/zoran/zoran_driver.c:294:12: warning: 'zoran_enum_fmt_vid_out' defined but not used [-Wunused-function] > 294 | static int zoran_enum_fmt_vid_out(struct file *file, void *__fh, > | ^~~~~~~~~~~~~~~~~~~~~~ > > Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> > --- Hello What about using "ifdef CONFIG_ZORAN_OUTPUT" instead of "ifdef 0" Otherwise: Acked-by: Corentin Labbe <clabbe@baylibre.com> Regards ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] zoran: fix sparse warnings 2020-10-02 7:29 ` LABBE Corentin @ 2020-10-02 9:05 ` Mauro Carvalho Chehab 0 siblings, 0 replies; 6+ messages in thread From: Mauro Carvalho Chehab @ 2020-10-02 9:05 UTC (permalink / raw) To: LABBE Corentin; +Cc: Hans Verkuil, linux-media Em Fri, 2 Oct 2020 09:29:09 +0200 LABBE Corentin <clabbe@baylibre.com> escreveu: > On Mon, Sep 28, 2020 at 03:28:31PM +0200, Hans Verkuil wrote: > > The output is not fully supported yet, so some ops are > > commented out. Also comment out the corresponding callbacks to prevent > > these sparse warnings: > > > > drivers/staging/media/zoran/zoran_driver.c:656:12: warning: 'zoran_s_output' defined but not used [-Wunused-function] > > 656 | static int zoran_s_output(struct file *file, void *__fh, unsigned int output) > > | ^~~~~~~~~~~~~~ > > drivers/staging/media/zoran/zoran_driver.c:649:12: warning: 'zoran_g_output' defined but not used [-Wunused-function] > > 649 | static int zoran_g_output(struct file *file, void *__fh, unsigned int *output) > > | ^~~~~~~~~~~~~~ > > drivers/staging/media/zoran/zoran_driver.c:635:12: warning: 'zoran_enum_output' defined but not used [-Wunused-function] > > 635 | static int zoran_enum_output(struct file *file, void *__fh, > > | ^~~~~~~~~~~~~~~~~ > > drivers/staging/media/zoran/zoran_driver.c:302:12: warning: 'zoran_enum_fmt_vid_overlay' defined but not used [-Wunused-function] > > 302 | static int zoran_enum_fmt_vid_overlay(struct file *file, void *__fh, > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~ > > drivers/staging/media/zoran/zoran_driver.c:294:12: warning: 'zoran_enum_fmt_vid_out' defined but not used [-Wunused-function] > > 294 | static int zoran_enum_fmt_vid_out(struct file *file, void *__fh, > > | ^~~~~~~~~~~~~~~~~~~~~~ > > > > Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> > > --- > > Hello > > What about using "ifdef CONFIG_ZORAN_OUTPUT" instead of "ifdef 0" > Otherwise: > Acked-by: Corentin Labbe <clabbe@baylibre.com> No. Better to keep #ifdef 0, a this has a higher chance of being noticed when the driver moves out of staging. Thanks, Mauro ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-10-02 9:05 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-09-28 13:28 [PATCH 0/2] zoran: sparse/smatch fixes Hans Verkuil 2020-09-28 13:28 ` [PATCH 1/2] zoran: fix smatch warning Hans Verkuil 2020-10-02 7:29 ` LABBE Corentin 2020-09-28 13:28 ` [PATCH 2/2] zoran: fix sparse warnings Hans Verkuil 2020-10-02 7:29 ` LABBE Corentin 2020-10-02 9:05 ` 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.