From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Paul E. McKenney" Subject: Re: [PATCH] acpi: fix pwr_btn_event_pending build error Date: Sat, 21 Jul 2012 16:37:14 -0700 Message-ID: <20120721233714.GL2435@linux.vnet.ibm.com> References: <20120721214156.GA2515@linux.vnet.ibm.com> <20120721215243.GA15362@shutemov.name> Reply-To: paulmck@linux.vnet.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <20120721215243.GA15362@shutemov.name> Sender: linux-kernel-owner@vger.kernel.org To: "Kirill A. Shutemov" Cc: lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-acpi@vger.kernel.org On Sun, Jul 22, 2012 at 12:52:43AM +0300, Kirill A. Shutemov wrote: > On Sat, Jul 21, 2012 at 02:41:56PM -0700, Paul E. McKenney wrote: > > Hello! > >=20 > > A recent build for KVM on x86 resulted in the following build error= : > >=20 > > drivers/acpi/sleep.c:60:13: warning: =E2=80=98pwr_btn_event_pending= =E2=80=99 defined but not > > +used [-Wunused-variable] > >=20 > > This patch silences this error. > >=20 > > Signed-off-by: Paul E. McKenney > >=20 > > diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c > > index 8856102..18347aa 100644 > > --- a/drivers/acpi/sleep.c > > +++ b/drivers/acpi/sleep.c > > @@ -57,7 +57,9 @@ MODULE_PARM_DESC(gts, "Enable evaluation of _GTS = on suspend."); > > MODULE_PARM_DESC(bfs, "Enable evaluation of _BFS on resume".); > > =20 > > static u8 sleep_states[ACPI_S_STATE_COUNT]; > > +#ifdef CONFIG_ACPI_SLEEP > > static bool pwr_btn_event_pending; > > +#endif /* #ifdef CONFIG_ACPI_SLEEP */ >=20 > __maybe_unused ? Are the compiler and linker smart enough to get rid of the storage in case it really isn't used? (Not that the storage for a bool is worth worrying about, but...) Thanx, Paul