From patchwork Tue Jan 26 14:09:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101087 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1981001lbb; Tue, 26 Jan 2016 06:11:30 -0800 (PST) X-Received: by 10.66.141.109 with SMTP id rn13mr33503745pab.83.1453817489205; Tue, 26 Jan 2016 06:11:29 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xc4si2209967pab.244.2016.01.26.06.11.28; Tue, 26 Jan 2016 06:11:29 -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 S1757253AbcAZOL0 (ORCPT + 30 others); Tue, 26 Jan 2016 09:11:26 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:57549 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757136AbcAZOLV (ORCPT ); Tue, 26 Jan 2016 09:11:21 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0MEEDQ-1aLoCr02sS-00FU3P; Tue, 26 Jan 2016 15:10:45 +0100 From: Arnd Bergmann To: Hans Verkuil , Mauro Carvalho Chehab Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/7] [media] hdpvr: hide unused variable Date: Tue, 26 Jan 2016 15:09:56 +0100 Message-Id: <1453817424-3080054-2-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:KJPfS55XE17nbMC+asF4ek31DgjkULWWBdlVhrWVJVDy9MZrukD ShWegEl4YatHcw5ar+BVMuh4IndhJfmnKEKOSFR/P7IzvkIuhrk9x468FICajegKCQ4wcC1 ENBdH4vPolsHkKZV4tEsaF3RerMNrd/xWprmNG2tA2+P8j1zkMmcFOAwWNczhoIq9TImXED Tuyj0WiDIlqnwDlTqDs6w== X-UI-Out-Filterresults: notjunk:1; V01:K0:cnY+032lXgU=:A0VEB0nL2xfyTqqpgMcvhn bxSNsyBfCh676v58aZCwYO5cWCg46lKJLuV8CMIweHvPJ1YML1r2pGyrPp0qPRAA38ExdgSe/ 3QA/PkjbLP8fj2v4BAHD9vaQ/6tPjE2CMCiTBiIJQU76uO+QO3EJJcvQjWqLY+CHrZiR7naE/ gAiQ8Uk9rJgDB2E2JqnVunPmyWgRN7Js3GWW3xXE1ixVpPh8jR/921t6exNNt/5NwbZtoQ3I0 g6F55xPRwPfhlS7QlpmOljxMbtDCoEHKwHsMjrhE6GhZ3b3g5+VkCC5rjO6q5bzQIjnDZpWEZ NuY+CeuGdSy6i+gagYRgtCsqgs0nAn/UySKCSkKjzzaH6V/l8lNlgu/FQkCDrDQom4AyJnfO4 AjTU/S0lk10nR+AYddRQJROOE5xLNAAVlVz5vJ9E7fCxelBBjfACPvaltFu+2N7ZyFuwiQrRn ht6nG8LYJhuR8q+CBAAG+qDc0dzGs4zR778c1dqKvx6tHUHuXuH4/FdXcF07mIi/EegUaItU1 lsecKRE1fw9ZQ3yHQnWLBFBkdCzi/eflSpwU9L9ehpR51I04rxUy6rbmcJpw+Ol8ibhxSxG0z bykfb16lNJt6Kqv+wII4oej5opWgUCm1T4Xs36zdGcVuplZ2Kw6H0eXiwDIuHD2TfyKkfXCzv O3OvANxhsyHAlNWeMBqCLPCoS2jMnUMGYlGNgb8EXnaDGpHP3W4Splq6XU+pr8rlPaD0= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The i2c client pointer is only used when CONFIG_I2C is set, and otherwise produces a compile-time warning: drivers/media/usb/hdpvr/hdpvr-core.c: In function 'hdpvr_probe': drivers/media/usb/hdpvr/hdpvr-core.c:276:21: error: unused variable 'client' [-Werror=unused-variable] This uses the same #ifdef to hide the variable when the code using it is hidden. Signed-off-by: Arnd Bergmann --- drivers/media/usb/hdpvr/hdpvr-core.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.7.0 diff --git a/drivers/media/usb/hdpvr/hdpvr-core.c b/drivers/media/usb/hdpvr/hdpvr-core.c index 3fc64197b4e6..08f0ca7aa012 100644 --- a/drivers/media/usb/hdpvr/hdpvr-core.c +++ b/drivers/media/usb/hdpvr/hdpvr-core.c @@ -273,7 +273,9 @@ static int hdpvr_probe(struct usb_interface *interface, struct hdpvr_device *dev; struct usb_host_interface *iface_desc; struct usb_endpoint_descriptor *endpoint; +#if IS_ENABLED(CONFIG_I2C) struct i2c_client *client; +#endif size_t buffer_size; int i; int retval = -ENOMEM;