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: 8123081 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5C020BEEE5 for ; Tue, 26 Jan 2016 14:12:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E247820259 for ; Tue, 26 Jan 2016 14:12:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1178720222 for ; Tue, 26 Jan 2016 14:12:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757154AbcAZOMQ (ORCPT ); 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 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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)