All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: Corentin Labbe <clabbe@baylibre.com>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: [PATCH 2/2] zoran: fix sparse warnings
Date: Mon, 28 Sep 2020 15:28:31 +0200	[thread overview]
Message-ID: <20200928132831.1587872-3-hverkuil-cisco@xs4all.nl> (raw)
In-Reply-To: <20200928132831.1587872-1-hverkuil-cisco@xs4all.nl>

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


  parent reply	other threads:[~2020-09-28 13:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Hans Verkuil [this message]
2020-10-02  7:29   ` [PATCH 2/2] zoran: fix sparse warnings LABBE Corentin
2020-10-02  9:05     ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200928132831.1587872-3-hverkuil-cisco@xs4all.nl \
    --to=hverkuil-cisco@xs4all.nl \
    --cc=clabbe@baylibre.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.