From patchwork Tue Jan 26 14:09:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101085 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1981494lbb; Tue, 26 Jan 2016 06:12:18 -0800 (PST) X-Received: by 10.66.255.39 with SMTP id an7mr33957463pad.101.1453817537916; Tue, 26 Jan 2016 06:12:17 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d66si2265741pfj.173.2016.01.26.06.12.17; Tue, 26 Jan 2016 06:12:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757154AbcAZOMQ (ORCPT + 4 others); Tue, 26 Jan 2016 09:12:16 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:52123 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756544AbcAZOMN (ORCPT ); Tue, 26 Jan 2016 09:12:13 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0MfqGy-1aisTg0Kvs-00N8UJ; Tue, 26 Jan 2016 15:11:40 +0100 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Hans Verkuil , Jemma Denson , 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 Message-Id: <1453817424-3080054-4-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1453817424-3080054-1-git-send-email-arnd@arndb.de> References: <1453817424-3080054-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:F4WB795hzhpbJTpXRMsq48KFAunjb6SrPSJyjNYpJlWMp+DcIHw mObByn6JTBQ/BwGZr74WnieC8bujVMr/JUuXAsFruka8Ll+ZWNv+PXHRBtoZoWpvARmLE/+ YP+FRMRWwp21OMuabVlmmXzTLcmf+/MjpRflofwAiwAp9DMtCkuLg8OUoagM+cr7qjnmhrc 8C0ELSpCjtRpdL1jIuoGg== X-UI-Out-Filterresults: notjunk:1; V01:K0:r5rRAqpq7Ss=:WLxttz7r3mhQcN5G3EnPIe 5I7vLh5RR1TxmmK5d8DFNLQiGwOsnMQEvxxtGi6PnCYlED2UCWirCEn9602Hpxr3GBjQ2BJMG Q9GC5MzjRoOvqCOylM8niLMZ841sT2oODFH50by3ySNMkXjNKhZf+mnB8jaAOPE3z8nuAGULC x3aQtORDpr3NoTEUzlD4BNVFSmcf5ptwq88E/8cZiUzjqPkMpYBmiUq6VM/29Qpxpfuv7a6dw C8VK8gGfsG4MyPCLjrcqeU/Os0MbXhVOOLl3kN1N+A1TG1Rq97STqaQsWrdS3tVqNL2ifsFGW E2PFwf666QqBlVQ7J31zgWPbfgvkd880CK5odexQPDI6hi4Vv/wWlXsa+h7KwxLtXtH+mQrmb CYBuCPLfFnwsZ7GFekAb9yfDKAJNjQ2SbZ6N/WGEKSLyc1336Me80nGYlDlSgopCXRqefw6Sk +pbpb/e2ZyRPTs+p8FgFxCiEPQgzzR3IS651TCwhWT13qiBxR8krIDQTwj5bGRkhtZ/TmEUiy 9BaeXNn0+NoxXMQX+LPviKJjOSOore6d3pCh71JuLrwi7BbG7lNka+IOK4Bq2ONv/tzhBHqBe sJs/k0aAjij4KRsIPXZv+RrM3N3PW9+yPKgdVLda7tIBdUkUqkacmZLE5eZ3tVhv3zSHwJsUz YhAawgF1HcRxPUlSxv4E84d/r55gqxQsmiDqO7/gQPn/Z+FEv3naClnVBCiV9D+0UoBo= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 --- drivers/media/common/b2c2/flexcop-fe-tuner.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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)