From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932186AbcA3QQk (ORCPT ); Sat, 30 Jan 2016 11:16:40 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:36664 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757014AbcA3QQi (ORCPT ); Sat, 30 Jan 2016 11:16:38 -0500 Date: Sat, 30 Jan 2016 17:16:34 +0100 From: Pavel Machek To: Arnd Bergmann Cc: Sebastian Reichel , linux-arm-kernel@lists.infradead.org, Dmitry Eremin-Solenikov , David Woodhouse , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] power: collie_battery: hide unused variable Message-ID: <20160130161634.GA5230@amd> References: <1453736756-1959377-2-git-send-email-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1453736756-1959377-2-git-send-email-arnd@arndb.de> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 2016-01-25 16:45:49, Arnd Bergmann wrote: > The 'wakeup_enabled' variable in this driver is only accessed > by the optional power management functions and we get a warning > when they are disabled: > > drivers/power/collie_battery.c:29:12: error: 'wakeup_enabled' defined but not used [-Werror=unused-variable] > > This moves the definition next to the users inside the same #ifdef, > which avoids the warning. > > Signed-off-by: Arnd Bergmann Acked-by: Pavel Machek -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html