From patchwork Sun Jul 22 04:10:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 1224141 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id A36403FC33 for ; Sun, 22 Jul 2012 04:12:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750777Ab2GVEL0 (ORCPT ); Sun, 22 Jul 2012 00:11:26 -0400 Received: from e4.ny.us.ibm.com ([32.97.182.144]:36371 "EHLO e4.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750725Ab2GVEL0 (ORCPT ); Sun, 22 Jul 2012 00:11:26 -0400 Received: from /spool/local by e4.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 22 Jul 2012 00:11:25 -0400 Received: from d01dlp01.pok.ibm.com (9.56.224.56) by e4.ny.us.ibm.com (192.168.1.104) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sun, 22 Jul 2012 00:10:45 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 9954F38C803A; Sun, 22 Jul 2012 00:10:44 -0400 (EDT) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6M4AiDL427294; Sun, 22 Jul 2012 00:10:44 -0400 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6M4AhJr018651; Sat, 21 Jul 2012 22:10:43 -0600 Received: from paulmck-ThinkPad-W500 (sig-9-48-82-141.mts.ibm.com [9.48.82.141]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q6M4AeeA018104; Sat, 21 Jul 2012 22:10:42 -0600 Received: by paulmck-ThinkPad-W500 (Postfix, from userid 1000) id 78146E4D89; Sat, 21 Jul 2012 21:10:38 -0700 (PDT) Date: Sat, 21 Jul 2012 21:10:38 -0700 From: "Paul E. McKenney" To: "Kirill A. Shutemov" Cc: lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] acpi: fix pwr_btn_event_pending build error Message-ID: <20120722041038.GN2435@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <20120721214156.GA2515@linux.vnet.ibm.com> <20120721215243.GA15362@shutemov.name> <20120721233714.GL2435@linux.vnet.ibm.com> <20120722000838.GA15798@shutemov.name> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20120722000838.GA15798@shutemov.name> User-Agent: Mutt/1.5.21 (2010-09-15) X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12072204-3534-0000-0000-00000AA8DDF5 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Sun, Jul 22, 2012 at 03:08:40AM +0300, Kirill A. Shutemov wrote: > On Sat, Jul 21, 2012 at 04:37:14PM -0700, Paul E. McKenney wrote: > > 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! > > > > > > > > A recent build for KVM on x86 resulted in the following build error: > > > > > > > > drivers/acpi/sleep.c:60:13: warning: ‘pwr_btn_event_pending’ defined but not > > > > +used [-Wunused-variable] > > > > > > > > This patch silences this error. > > > > > > > > Signed-off-by: Paul E. McKenney > > > > > > > > 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".); > > > > > > > > static u8 sleep_states[ACPI_S_STATE_COUNT]; > > > > +#ifdef CONFIG_ACPI_SLEEP > > > > static bool pwr_btn_event_pending; > > > > +#endif /* #ifdef CONFIG_ACPI_SLEEP */ > > > > > > __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...) > > GCC with optimization enabled will get rid of the storage even without > __maybe_unused. OK, that should allow me to get rid of a few ifdefs, then! For this one, please see below. Thanx, Paul ------------------------------------------------------------------------ acpi: fix pwr_btn_event_pending build error A recent build for KVM on x86 resulted in the following build error: drivers/acpi/sleep.c:60:13: warning: ‘pwr_btn_event_pending’ defined but not +used [-Wunused-variable] This patch silences this error. Signed-off-by: Paul E. McKenney --- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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".); static u8 sleep_states[ACPI_S_STATE_COUNT]; +#ifdef CONFIG_ACPI_SLEEP static bool pwr_btn_event_pending; +#endif /* #ifdef CONFIG_ACPI_SLEEP */ static void acpi_sleep_tts_switch(u32 acpi_state) {