From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laxman Dewangan Subject: Re: [PATCH] pinctrl: ish-pfc: avoid unused variable warning Date: Wed, 27 Apr 2016 15:23:39 +0530 Message-ID: <57208C23.3000303@nvidia.com> References: <1461751049-2751427-1-git-send-email-arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1461751049-2751427-1-git-send-email-arnd@arndb.de> Sender: linux-renesas-soc-owner@vger.kernel.org To: Arnd Bergmann , Laurent Pinchart , Geert Uytterhoeven , Linus Walleij Cc: Simon Horman , Wolfram Sang , Ulrich Hecht , Hisashi Nakamura , Takeshi Kihara , linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-gpio@vger.kernel.org On Wednesday 27 April 2016 03:26 PM, Arnd Bergmann wrote: > After the conversion to devm_pinctrl_register, we get a warning in > sh_pfc_remove when CONFIG_PINCTRL_SH_PFC_GPIO is disabled: > > drivers/pinctrl/sh-pfc/core.c: In function 'sh_pfc_remove': > drivers/pinctrl/sh-pfc/core.c:603:17: unused variable 'pfc' [-Werror=unused-variable] > struct sh_pfc *pfc = platform_get_drvdata(pdev); > > This moves the variable definition inside of the same ifdef > that has the only user, to get a clean build again. > Similar patch from Geert also: [PATCH] pinctrl: sh-pfc: Kill unused variable in sh_pfc_remove() If devm_gpiochip_add_data() used then this may not be required.