All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Shuah Khan <shuahkh@osg.samsung.com>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Subject: [PATCH] v4l2-mc.h: fix compiler warnings
Date: Thu, 3 Mar 2016 08:37:14 +0100	[thread overview]
Message-ID: <56D7E9AA.90304@xs4all.nl> (raw)

Fix these warnings when CONFIG_MEDIA_CONTROLLER is not defined:

In file included from /home/hans/work/build/media-git/drivers/media/v4l2-core/v4l2-fh.c:32:0:
/home/hans/work/build/media-git/include/media/v4l2-mc.h:173:12: warning: 'v4l_enable_media_source' defined but not used [-Wunused-function]
 static int v4l_enable_media_source(struct video_device *vdev)
            ^
/home/hans/work/build/media-git/include/media/v4l2-mc.h:183:12: warning: 'v4l_vb2q_enable_media_source' defined but not used [-Wunused-function]
 static int v4l_vb2q_enable_media_source(struct vb2_queue *q)
            ^
In file included from /home/hans/work/build/media-git/include/media/tuner.h:23:0,
                 from /home/hans/work/build/media-git/drivers/media/tuners/tuner-types.c:9:
/home/hans/work/build/media-git/include/media/v4l2-mc.h:173:12: warning: 'v4l_enable_media_source' defined but not used [-Wunused-function]
 static int v4l_enable_media_source(struct video_device *vdev)
            ^
/home/hans/work/build/media-git/include/media/v4l2-mc.h:178:13: warning: 'v4l_disable_media_source' defined but not used [-Wunused-function]
 static void v4l_disable_media_source(struct video_device *vdev)
             ^


Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---

Please test without CONFIG_MEDIA_CONTROLLER or at least check the daily build results!
This is the second time I have to clean up a mistake in this header.

Regards,

	Hans

---
diff --git a/include/media/v4l2-mc.h b/include/media/v4l2-mc.h
index 5cbc209..311885e 100644
--- a/include/media/v4l2-mc.h
+++ b/include/media/v4l2-mc.h
@@ -170,17 +170,17 @@ static inline int v4l2_mc_create_media_graph(struct media_device *mdev)
 	return 0;
 }

-static int v4l_enable_media_source(struct video_device *vdev)
+static inline int v4l_enable_media_source(struct video_device *vdev)
 {
 	return 0;
 }

-static void v4l_disable_media_source(struct video_device *vdev)
+static inline void v4l_disable_media_source(struct video_device *vdev)
 {
 	return;
 }

-static int v4l_vb2q_enable_media_source(struct vb2_queue *q)
+static inline int v4l_vb2q_enable_media_source(struct vb2_queue *q)
 {
 	return 0;
 }

                 reply	other threads:[~2016-03-03  7:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=56D7E9AA.90304@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=shuahkh@osg.samsung.com \
    /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.