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: 8123061 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9ABE19F1C0 for ; Tue, 26 Jan 2016 14:12:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DA45820259 for ; Tue, 26 Jan 2016 14:12:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E2C5E20222 for ; Tue, 26 Jan 2016 14:12:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757174AbcAZOLY (ORCPT ); Tue, 26 Jan 2016 09:11:24 -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-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 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(+) 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;