Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751473AbdIPKxu (ORCPT ); Sat, 16 Sep 2017 06:53:50 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:46840 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751347AbdIPKxq (ORCPT ); Sat, 16 Sep 2017 06:53:46 -0400 X-Google-Smtp-Source: AOwi7QC6zgAm4Sq68sN7X0s/JN960g1S1aQCS1baG7UrqUZC6pHxWL0Wp9v5bO+ixMNOqVDAIlFqaw== Date: Sat, 16 Sep 2017 14:53:39 +0400 From: Anton Sviridenko To: Arnd Bergmann Cc: Bluecherry Maintainers , Ismael Luceno , Andrey Utkin , Mauro Carvalho Chehab , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [media] solo6x10: hide unused variable Message-ID: <20170916105337.GA8054@magpie-gentoo> References: <20170915195225.1394284-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170915195225.1394284-1-arnd@arndb.de> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1204 Lines: 36 On Fri, Sep 15, 2017 at 09:52:04PM +0200, Arnd Bergmann wrote: > When building without CONFIG_GPIOLIB, we get a harmless > warning about an unused variable: > > drivers/media/pci/solo6x10/solo6x10-gpio.c: In function 'solo_gpio_init': > drivers/media/pci/solo6x10/solo6x10-gpio.c:165:6: error: unused variable 'ret' [-Werror=unused-variable] > > This adds another #ifdef around the declaration. > > Fixes: d3202d1981dc ("media: solo6x10: export hardware GPIO pins 8:31 to gpiolib interface") > Signed-off-by: Arnd Bergmann > --- > drivers/media/pci/solo6x10/solo6x10-gpio.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/media/pci/solo6x10/solo6x10-gpio.c b/drivers/media/pci/solo6x10/solo6x10-gpio.c > index 3d0d1aa2f6a8..7b4641a2cb84 100644 > --- a/drivers/media/pci/solo6x10/solo6x10-gpio.c > +++ b/drivers/media/pci/solo6x10/solo6x10-gpio.c > @@ -162,7 +162,9 @@ static void solo_gpiochip_set(struct gpio_chip *chip, > > int solo_gpio_init(struct solo_dev *solo_dev) > { > +#ifdef CONFIG_GPIOLIB > int ret; > +#endif > > solo_gpio_config(solo_dev); > #ifdef CONFIG_GPIOLIB > -- > 2.9.0 > Acked-by: Anton Sviridenko