Received: by 10.223.185.116 with SMTP id b49csp1125494wrg; Fri, 23 Feb 2018 12:22:26 -0800 (PST) X-Google-Smtp-Source: AH8x227mrP4pUdmcg7jFdIeiIdtOxyGQBxOr7G9YutjiSVnaM4eN5SyJulPdH0iZHXG7Fuj/leFV X-Received: by 2002:a17:902:57c1:: with SMTP id g1-v6mr2790526plj.381.1519417346150; Fri, 23 Feb 2018 12:22:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519417346; cv=none; d=google.com; s=arc-20160816; b=erCNYpzXhylEECtf6d6NLazsDqJTiiGJeFzFylYkltzK8NyeixYYWiQAfAfYmERBf5 PROGK4JP87NuOOw/8sR+0afe1syWSHwZzVSBXfqSElUXJU34C7BXBHgb8MDzwftfi+Hk NI7OEsZ8+B2WH1y0mNQRSO1QZ25x6TA8TrEsfnijwL0OiuGFs3SAw+sYublXeg/4sSsj WyuYX5XR6Z08A1gCamNf8T88DAbTnx9whuTW3Uy8LF6FaTQvvzwK3aA3Z1Vc8uHt+ZBm QxpeKrp8Xk4ZqUSkBZiunmLdz/0ofxbVfk8p1eSjOM9ucotKzEr2Jk6RuEcB0e7TTWSA SRQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=kVs6SwhV4UkaGP9AUamyU5FEM3ptyoWmmVuTDB2i88k=; b=iToNUAyV3sixq5D/0vUosYCxdAQEy2BaqFg74tCYp1pU5ElSki4eeTIIn1/Q05IlVM 62bZnozFPjOdZpc82ZjM6rQq/mW+onJ4mHyBLwI59ul68InI1dU9KGP6ZPTjJNpE1xFo X8Img4GstbplNVQ6+w7RJejb9CsHGNFgqnEJVZG0Y++bGuEbl3DECndlpPkNpFDVp7tn YW82XlSvqmviFenuzS/xcX7IVdhNKSBCl7yLdujMSfsWW77DA+CUTMFECtE8bR7Ql2qN ZQA7gWzY2jsmd/J3o7ZUfRbYYt8sOf1Niw+hOIet0TT2NHjHyl1t0GQ0uuYTngzDxz6e Fl8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si2190867pls.721.2018.02.23.12.22.11; Fri, 23 Feb 2018 12:22:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932434AbeBWSil (ORCPT + 99 others); Fri, 23 Feb 2018 13:38:41 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:39352 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932314AbeBWSie (ORCPT ); Fri, 23 Feb 2018 13:38:34 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D12C610B6; Fri, 23 Feb 2018 18:38:32 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Mauro Carvalho Chehab Subject: [PATCH 4.4 127/193] [media] b2c2: flexcop: avoid unused function warnings Date: Fri, 23 Feb 2018 19:26:00 +0100 Message-Id: <20180223170345.788856247@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 #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 dv #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)