mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Arnd Bergmann <arnd@arndb.de>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Jemma Denson <jdenson@gmail.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 4/7] [media] b2c2: flexcop: avoid unused function warnings
Date: Tue, 26 Jan 2016 15:09:58 +0100	[thread overview]
Message-ID: <1453817424-3080054-4-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1453817424-3080054-1-git-send-email-arnd@arndb.de>

The flexcop driver has two functions that are normally used, except
when multiple frontend drivers are disabled:

drivers/media/common/b2c2/flexcop-fe-tuner.c:42:12: warning: 'flexcop_set_voltage' defined but not used [-Wunused-function]
drivers/media/common/b2c2/flexcop-fe-tuner.c:71:12: warning: 'flexcop_sleep' defined but not used [-Wunused-function]

This avoids the build warning by updating the #ifdef for flexcop_set_voltage
to the exact condition under which it is used. For flexcop_sleep, the
condition is rather complex, so I resort to marking it as __maybe_unused,
so the compiler can silently drop it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/media/common/b2c2/flexcop-fe-tuner.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/common/b2c2/flexcop-fe-tuner.c b/drivers/media/common/b2c2/flexcop-fe-tuner.c
index 9c59f4306883..f5956402fc69 100644
--- a/drivers/media/common/b2c2/flexcop-fe-tuner.c
+++ b/drivers/media/common/b2c2/flexcop-fe-tuner.c
@@ -38,7 +38,7 @@ static int flexcop_fe_request_firmware(struct dvb_frontend *fe,
 #endif
 
 /* lnb control */
-#if FE_SUPPORTED(MT312) || FE_SUPPORTED(STV0299)
+#if (FE_SUPPORTED(MT312) || FE_SUPPORTED(STV0299)) && FE_SUPPORTED(PLL)
 static int flexcop_set_voltage(struct dvb_frontend *fe,
 			       enum fe_sec_voltage voltage)
 {
@@ -68,7 +68,7 @@ static int flexcop_set_voltage(struct dvb_frontend *fe,
 #endif
 
 #if FE_SUPPORTED(S5H1420) || FE_SUPPORTED(STV0299) || FE_SUPPORTED(MT312)
-static int flexcop_sleep(struct dvb_frontend* fe)
+static int __maybe_unused flexcop_sleep(struct dvb_frontend* fe)
 {
 	struct flexcop_device *fc = fe->dvb->priv;
 	if (fc->fe_sleep)
-- 
2.7.0

  parent reply	other threads:[~2016-01-26 14:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-26 14:09 [PATCH 1/7] [media] pwc: hide unused label Arnd Bergmann
2016-01-26 14:09 ` [PATCH 2/7] [media] hdpvr: hide unused variable Arnd Bergmann
2016-01-26 14:09 ` [PATCH 3/7] [media] gspca: avoid unused variable warnings Arnd Bergmann
2016-07-03 21:22   ` [3/7,media] " Hans de Goede
2016-01-26 14:09 ` Arnd Bergmann [this message]
2016-01-26 14:09 ` [PATCH 5/7] [media] em28xx: only use mt9v011 if camera support is enabled Arnd Bergmann
2016-01-26 14:10 ` [PATCH 6/7] [media] em28xx: add MEDIA_TUNER dependency Arnd Bergmann
2016-01-26 14:33   ` Mauro Carvalho Chehab
2016-01-26 15:53     ` Arnd Bergmann
2016-01-26 16:36       ` Mauro Carvalho Chehab
2016-01-26 16:51         ` Arnd Bergmann
2016-01-26 17:08           ` Mauro Carvalho Chehab
2016-01-26 22:01             ` Arnd Bergmann
2016-01-26 14:10 ` [PATCH 7/7] [media] go7007: add MEDIA_CAMERA_SUPPORT dependency Arnd Bergmann
2016-01-26 15:04   ` Mauro Carvalho Chehab
2016-01-26 15:41     ` Mauro Carvalho Chehab
2016-01-26 14:40 ` [PATCH 1/7] [media] pwc: hide unused label kbuild test robot
2016-01-26 15:29 ` Arnd Bergmann

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=1453817424-3080054-4-git-send-email-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=hans.verkuil@cisco.com \
    --cc=jdenson@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome