[lkml]   [2018]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 4.4 127/193] [media] b2c2: flexcop: avoid unused function warnings
4.4-stable review patch.  If anyone has any objections, please let me know.


From: Arnd Bergmann <>

commit 733d0def3ebdd1d088330d904149af21fa4b9ae2 upstream.

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 <>
Signed-off-by: Mauro Carvalho Chehab <>
Signed-off-by: Greg Kroah-Hartman <>

drivers/media/common/b2c2/flexcop-fe-tuner.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- 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(s

/* lnb control */
static int flexcop_set_voltage(struct dvb_frontend *fe,
enum fe_sec_voltage voltage)
@@ -68,7 +68,7 @@ static int flexcop_set_voltage(struct dv

-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)

 \ /
  Last update: 2018-02-23 19:39    [W:0.469 / U:24.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site