From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752050Ab2JBTWS (ORCPT ); Tue, 2 Oct 2012 15:22:18 -0400 Received: from 3.mo3.mail-out.ovh.net ([46.105.44.175]:42457 "EHLO mo3.mail-out.ovh.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751311Ab2JBTWR (ORCPT ); Tue, 2 Oct 2012 15:22:17 -0400 Date: Tue, 2 Oct 2012 20:55:40 +0200 From: Jean-Christophe PLAGNIOL-VILLARD To: Arnd Bergmann Cc: linux-arm-kernel@infradead.org, arm@kernel.org, linux-kernel@vger.kernel.org, Nicolas Ferre X-Ovh-Mailout: 178.32.228.3 (mo3.mail-out.ovh.net) Subject: Re: [PATCH 08/17] ARM: at91: unused variable in at91_pm_verify_clocks Message-ID: <20121002185540.GB5117@game.jcrosoft.org> References: <1349195816-2225-1-git-send-email-arnd@arndb.de> <1349195816-2225-9-git-send-email-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1349195816-2225-9-git-send-email-arnd@arndb.de> X-PGP-Key: http://uboot.jcrosoft.org/plagnioj.asc X-PGP-key-fingerprint: 6309 2BBA 16C8 3A07 1772 CC24 DEFC FFA3 279C CE7C User-Agent: Mutt/1.5.20 (2009-06-14) X-Ovh-Tracer-Id: 4124171359234534148 X-Ovh-Remote: 213.251.161.87 (ns32433.ovh.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: -100 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeehuddrtddvucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfhrhhomheplfgvrghnqdevhhhrihhsthhophhhvgcurffntefipffkqffnqdggkffnnfettfffuceophhlrghgnhhiohhjsehjtghrohhsohhfthdrtghomheqnecujfgurhepfffhvffukfhfgggtuggjfgesthdttfdttdervd X-Spam-Check: DONE|U 0.5/N X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeehuddrtddvucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfhrhhomheplfgvrghnqdevhhhrihhsthhophhhvgcurffntefipffkqffnqdggkffnnfettfffuceophhlrghgnhhiohhjsehjtghrohhsohhfthdrtghomheqnecujfgurhepfffhvffukfhfgggtuggjfgesthdttfdttdervd Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18:36 Tue 02 Oct , Arnd Bergmann wrote: > The code using the variable 'i' in this function is conditional, so > we have to make the declaration conditional as well to avoid a harmless > warning. > > Without this patch, building at91sam9263_defconfig results in: > > /home/arnd/linux-arm/arch/arm/mach-at91/pm.c: In function 'at91_pm_verify_clocks': > /home/arnd/linux-arm/arch/arm/mach-at91/pm.c:137:6: warning: unused variable 'i' [-Wunused-variable] > > Signed-off-by: Arnd Bergmann > Cc: Nicolas Ferre > Cc: Jean-Christophe Plagniol-Villard > --- > arch/arm/mach-at91/pm.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c > index 2c2d865..cdd620d 100644 > --- a/arch/arm/mach-at91/pm.c > +++ b/arch/arm/mach-at91/pm.c > @@ -135,7 +135,9 @@ static int at91_pm_begin(suspend_state_t state) > static int at91_pm_verify_clocks(void) > { > unsigned long scsr; > +#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS > int i; > +#endif please is if (IS_ENBLED()) #ifdef drop code coverage Best Regards, J.