All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] acpi: fix pwr_btn_event_pending build error
@ 2012-07-21 21:41 ` Paul E. McKenney
  0 siblings, 0 replies; 16+ messages in thread
From: Paul E. McKenney @ 2012-07-21 21:41 UTC (permalink / raw)
  To: lenb; +Cc: linux-acpi, linux-kernel

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 <paul.mckenney@linaro.org>

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)
 {

--
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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH] acpi: fix pwr_btn_event_pending build error
@ 2012-07-21 21:41 ` Paul E. McKenney
  0 siblings, 0 replies; 16+ messages in thread
From: Paul E. McKenney @ 2012-07-21 21:41 UTC (permalink / raw)
  To: lenb; +Cc: linux-acpi, linux-kernel

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 <paul.mckenney@linaro.org>

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)
 {


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH] acpi: fix pwr_btn_event_pending build error
  2012-07-21 21:41 ` Paul E. McKenney
  (?)
@ 2012-07-21 21:52 ` Kirill A. Shutemov
  2012-07-21 23:37   ` Paul E. McKenney
  -1 siblings, 1 reply; 16+ messages in thread
From: Kirill A. Shutemov @ 2012-07-21 21:52 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: lenb, linux-acpi, linux-kernel

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 <paul.mckenney@linaro.org>
> 
> 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 ?

-- 
 Kirill A. Shutemov

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] acpi: fix pwr_btn_event_pending build error
  2012-07-21 21:52 ` Kirill A. Shutemov
@ 2012-07-21 23:37   ` Paul E. McKenney
  2012-07-22  0:08     ` Kirill A. Shutemov
  0 siblings, 1 reply; 16+ messages in thread
From: Paul E. McKenney @ 2012-07-21 23:37 UTC (permalink / raw)
  To: Kirill A. Shutemov; +Cc: lenb, linux-acpi, linux-kernel

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 <paul.mckenney@linaro.org>
> > 
> > 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...)

							Thanx, Paul

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] acpi: fix pwr_btn_event_pending build error
  2012-07-21 23:37   ` Paul E. McKenney
@ 2012-07-22  0:08     ` Kirill A. Shutemov
  2012-07-22  4:10         ` Paul E. McKenney
  0 siblings, 1 reply; 16+ messages in thread
From: Kirill A. Shutemov @ 2012-07-22  0:08 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: lenb, linux-acpi, linux-kernel

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 <paul.mckenney@linaro.org>
> > > 
> > > 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.

-- 
 Kirill A. Shutemov

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] acpi: fix pwr_btn_event_pending build error
  2012-07-22  0:08     ` Kirill A. Shutemov
@ 2012-07-22  4:10         ` Paul E. McKenney
  0 siblings, 0 replies; 16+ messages in thread
From: Paul E. McKenney @ 2012-07-22  4:10 UTC (permalink / raw)
  To: Kirill A. Shutemov; +Cc: lenb, linux-acpi, linux-kernel

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 <paul.mckenney@linaro.org>
> > > > 
> > > > 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 <paul.mckenney@linaro.org>

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)
 {

--
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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH] acpi: fix pwr_btn_event_pending build error
@ 2012-07-22  4:10         ` Paul E. McKenney
  0 siblings, 0 replies; 16+ messages in thread
From: Paul E. McKenney @ 2012-07-22  4:10 UTC (permalink / raw)
  To: Kirill A. Shutemov; +Cc: lenb, linux-acpi, linux-kernel

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 <paul.mckenney@linaro.org>
> > > > 
> > > > 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 <paul.mckenney@linaro.org>

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)
 {


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH] acpi: fix pwr_btn_event_pending build error
  2012-07-22  4:10         ` Paul E. McKenney
@ 2012-07-22 17:40           ` Rafael J. Wysocki
  -1 siblings, 0 replies; 16+ messages in thread
From: Rafael J. Wysocki @ 2012-07-22 17:40 UTC (permalink / raw)
  To: paulmck; +Cc: Kirill A. Shutemov, lenb, linux-acpi, linux-kernel

On Sunday, July 22, 2012, Paul E. McKenney wrote:
> 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 <paul.mckenney@linaro.org>
> > > > > 
> > > > > 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 <paul.mckenney@linaro.org>

Well, I prefer the one below.

Thanks,
Rafael

---
From: Rafael J. Wysocki <rjw@sisk.pl>
Subject: ACPI / PM: Fix build warning in sleep.c for CONFIG_ACPI_SLEEP unset

If CONFIG_ACPI_SLEEP is unset, the compiler complains that
pwr_btn_event_pending is defined but not used.  To silence the
warning, move the definition of pwr_btn_event_pending under an
apprporiate #ifdef.

Reported-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/acpi/sleep.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/drivers/acpi/sleep.c
===================================================================
--- linux.orig/drivers/acpi/sleep.c
+++ linux/drivers/acpi/sleep.c
@@ -57,7 +57,6 @@ MODULE_PARM_DESC(gts, "Enable evaluation
 MODULE_PARM_DESC(bfs, "Enable evaluation of _BFS on resume".);
 
 static u8 sleep_states[ACPI_S_STATE_COUNT];
-static bool pwr_btn_event_pending;
 
 static void acpi_sleep_tts_switch(u32 acpi_state)
 {
@@ -110,6 +109,7 @@ static int acpi_sleep_prepare(u32 acpi_s
 
 #ifdef CONFIG_ACPI_SLEEP
 static u32 acpi_target_sleep_state = ACPI_STATE_S0;
+static bool pwr_btn_event_pending;
 
 /*
  * The ACPI specification wants us to save NVS memory regions during hibernation
--
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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] acpi: fix pwr_btn_event_pending build error
@ 2012-07-22 17:40           ` Rafael J. Wysocki
  0 siblings, 0 replies; 16+ messages in thread
From: Rafael J. Wysocki @ 2012-07-22 17:40 UTC (permalink / raw)
  To: paulmck; +Cc: Kirill A. Shutemov, lenb, linux-acpi, linux-kernel

On Sunday, July 22, 2012, Paul E. McKenney wrote:
> 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 <paul.mckenney@linaro.org>
> > > > > 
> > > > > 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 <paul.mckenney@linaro.org>

Well, I prefer the one below.

Thanks,
Rafael

---
From: Rafael J. Wysocki <rjw@sisk.pl>
Subject: ACPI / PM: Fix build warning in sleep.c for CONFIG_ACPI_SLEEP unset

If CONFIG_ACPI_SLEEP is unset, the compiler complains that
pwr_btn_event_pending is defined but not used.  To silence the
warning, move the definition of pwr_btn_event_pending under an
apprporiate #ifdef.

Reported-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/acpi/sleep.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/drivers/acpi/sleep.c
===================================================================
--- linux.orig/drivers/acpi/sleep.c
+++ linux/drivers/acpi/sleep.c
@@ -57,7 +57,6 @@ MODULE_PARM_DESC(gts, "Enable evaluation
 MODULE_PARM_DESC(bfs, "Enable evaluation of _BFS on resume".);
 
 static u8 sleep_states[ACPI_S_STATE_COUNT];
-static bool pwr_btn_event_pending;
 
 static void acpi_sleep_tts_switch(u32 acpi_state)
 {
@@ -110,6 +109,7 @@ static int acpi_sleep_prepare(u32 acpi_s
 
 #ifdef CONFIG_ACPI_SLEEP
 static u32 acpi_target_sleep_state = ACPI_STATE_S0;
+static bool pwr_btn_event_pending;
 
 /*
  * The ACPI specification wants us to save NVS memory regions during hibernation

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] acpi: fix pwr_btn_event_pending build error
  2012-07-22 17:40           ` Rafael J. Wysocki
@ 2012-07-22 20:28             ` Paul E. McKenney
  -1 siblings, 0 replies; 16+ messages in thread
From: Paul E. McKenney @ 2012-07-22 20:28 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Kirill A. Shutemov, lenb, linux-acpi, linux-kernel

On Sun, Jul 22, 2012 at 07:40:51PM +0200, Rafael J. Wysocki wrote:
> On Sunday, July 22, 2012, Paul E. McKenney wrote:
> > 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 <paul.mckenney@linaro.org>
> > > > > > 
> > > > > > 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 <paul.mckenney@linaro.org>
> 
> Well, I prefer the one below.

Works for me!

							Thanx, Paul

> Thanks,
> Rafael
> 
> ---
> From: Rafael J. Wysocki <rjw@sisk.pl>
> Subject: ACPI / PM: Fix build warning in sleep.c for CONFIG_ACPI_SLEEP unset
> 
> If CONFIG_ACPI_SLEEP is unset, the compiler complains that
> pwr_btn_event_pending is defined but not used.  To silence the
> warning, move the definition of pwr_btn_event_pending under an
> apprporiate #ifdef.
> 
> Reported-by: Paul E. McKenney <paul.mckenney@linaro.org>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
>  drivers/acpi/sleep.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux/drivers/acpi/sleep.c
> ===================================================================
> --- linux.orig/drivers/acpi/sleep.c
> +++ linux/drivers/acpi/sleep.c
> @@ -57,7 +57,6 @@ MODULE_PARM_DESC(gts, "Enable evaluation
>  MODULE_PARM_DESC(bfs, "Enable evaluation of _BFS on resume".);
>  
>  static u8 sleep_states[ACPI_S_STATE_COUNT];
> -static bool pwr_btn_event_pending;
>  
>  static void acpi_sleep_tts_switch(u32 acpi_state)
>  {
> @@ -110,6 +109,7 @@ static int acpi_sleep_prepare(u32 acpi_s
>  
>  #ifdef CONFIG_ACPI_SLEEP
>  static u32 acpi_target_sleep_state = ACPI_STATE_S0;
> +static bool pwr_btn_event_pending;
>  
>  /*
>   * The ACPI specification wants us to save NVS memory regions during hibernation
> 

--
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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] acpi: fix pwr_btn_event_pending build error
@ 2012-07-22 20:28             ` Paul E. McKenney
  0 siblings, 0 replies; 16+ messages in thread
From: Paul E. McKenney @ 2012-07-22 20:28 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Kirill A. Shutemov, lenb, linux-acpi, linux-kernel

On Sun, Jul 22, 2012 at 07:40:51PM +0200, Rafael J. Wysocki wrote:
> On Sunday, July 22, 2012, Paul E. McKenney wrote:
> > 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 <paul.mckenney@linaro.org>
> > > > > > 
> > > > > > 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 <paul.mckenney@linaro.org>
> 
> Well, I prefer the one below.

Works for me!

							Thanx, Paul

> Thanks,
> Rafael
> 
> ---
> From: Rafael J. Wysocki <rjw@sisk.pl>
> Subject: ACPI / PM: Fix build warning in sleep.c for CONFIG_ACPI_SLEEP unset
> 
> If CONFIG_ACPI_SLEEP is unset, the compiler complains that
> pwr_btn_event_pending is defined but not used.  To silence the
> warning, move the definition of pwr_btn_event_pending under an
> apprporiate #ifdef.
> 
> Reported-by: Paul E. McKenney <paul.mckenney@linaro.org>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
>  drivers/acpi/sleep.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux/drivers/acpi/sleep.c
> ===================================================================
> --- linux.orig/drivers/acpi/sleep.c
> +++ linux/drivers/acpi/sleep.c
> @@ -57,7 +57,6 @@ MODULE_PARM_DESC(gts, "Enable evaluation
>  MODULE_PARM_DESC(bfs, "Enable evaluation of _BFS on resume".);
>  
>  static u8 sleep_states[ACPI_S_STATE_COUNT];
> -static bool pwr_btn_event_pending;
>  
>  static void acpi_sleep_tts_switch(u32 acpi_state)
>  {
> @@ -110,6 +109,7 @@ static int acpi_sleep_prepare(u32 acpi_s
>  
>  #ifdef CONFIG_ACPI_SLEEP
>  static u32 acpi_target_sleep_state = ACPI_STATE_S0;
> +static bool pwr_btn_event_pending;
>  
>  /*
>   * The ACPI specification wants us to save NVS memory regions during hibernation
> 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] acpi: fix pwr_btn_event_pending build error
  2012-07-22 20:28             ` Paul E. McKenney
@ 2012-07-23 18:58               ` Rafael J. Wysocki
  -1 siblings, 0 replies; 16+ messages in thread
From: Rafael J. Wysocki @ 2012-07-23 18:58 UTC (permalink / raw)
  To: paulmck; +Cc: Kirill A. Shutemov, lenb, linux-acpi, linux-kernel

On Sunday, July 22, 2012, Paul E. McKenney wrote:
> On Sun, Jul 22, 2012 at 07:40:51PM +0200, Rafael J. Wysocki wrote:
> > On Sunday, July 22, 2012, Paul E. McKenney wrote:
> > > 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 <paul.mckenney@linaro.org>
> > > > > > > 
> > > > > > > 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 <paul.mckenney@linaro.org>
> > 
> > Well, I prefer the one below.
> 
> Works for me!

Cool. :-)

I'll resend it just in case there was some confusion somewhere.

Thanks,
Rafael


> > ---
> > From: Rafael J. Wysocki <rjw@sisk.pl>
> > Subject: ACPI / PM: Fix build warning in sleep.c for CONFIG_ACPI_SLEEP unset
> > 
> > If CONFIG_ACPI_SLEEP is unset, the compiler complains that
> > pwr_btn_event_pending is defined but not used.  To silence the
> > warning, move the definition of pwr_btn_event_pending under an
> > apprporiate #ifdef.
> > 
> > Reported-by: Paul E. McKenney <paul.mckenney@linaro.org>
> > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > ---
> >  drivers/acpi/sleep.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > Index: linux/drivers/acpi/sleep.c
> > ===================================================================
> > --- linux.orig/drivers/acpi/sleep.c
> > +++ linux/drivers/acpi/sleep.c
> > @@ -57,7 +57,6 @@ MODULE_PARM_DESC(gts, "Enable evaluation
> >  MODULE_PARM_DESC(bfs, "Enable evaluation of _BFS on resume".);
> >  
> >  static u8 sleep_states[ACPI_S_STATE_COUNT];
> > -static bool pwr_btn_event_pending;
> >  
> >  static void acpi_sleep_tts_switch(u32 acpi_state)
> >  {
> > @@ -110,6 +109,7 @@ static int acpi_sleep_prepare(u32 acpi_s
> >  
> >  #ifdef CONFIG_ACPI_SLEEP
> >  static u32 acpi_target_sleep_state = ACPI_STATE_S0;
> > +static bool pwr_btn_event_pending;
> >  
> >  /*
> >   * The ACPI specification wants us to save NVS memory regions during hibernation
> > 
> 
> 
> 

--
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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] acpi: fix pwr_btn_event_pending build error
@ 2012-07-23 18:58               ` Rafael J. Wysocki
  0 siblings, 0 replies; 16+ messages in thread
From: Rafael J. Wysocki @ 2012-07-23 18:58 UTC (permalink / raw)
  To: paulmck; +Cc: Kirill A. Shutemov, lenb, linux-acpi, linux-kernel

On Sunday, July 22, 2012, Paul E. McKenney wrote:
> On Sun, Jul 22, 2012 at 07:40:51PM +0200, Rafael J. Wysocki wrote:
> > On Sunday, July 22, 2012, Paul E. McKenney wrote:
> > > 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 <paul.mckenney@linaro.org>
> > > > > > > 
> > > > > > > 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 <paul.mckenney@linaro.org>
> > 
> > Well, I prefer the one below.
> 
> Works for me!

Cool. :-)

I'll resend it just in case there was some confusion somewhere.

Thanks,
Rafael


> > ---
> > From: Rafael J. Wysocki <rjw@sisk.pl>
> > Subject: ACPI / PM: Fix build warning in sleep.c for CONFIG_ACPI_SLEEP unset
> > 
> > If CONFIG_ACPI_SLEEP is unset, the compiler complains that
> > pwr_btn_event_pending is defined but not used.  To silence the
> > warning, move the definition of pwr_btn_event_pending under an
> > apprporiate #ifdef.
> > 
> > Reported-by: Paul E. McKenney <paul.mckenney@linaro.org>
> > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > ---
> >  drivers/acpi/sleep.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > Index: linux/drivers/acpi/sleep.c
> > ===================================================================
> > --- linux.orig/drivers/acpi/sleep.c
> > +++ linux/drivers/acpi/sleep.c
> > @@ -57,7 +57,6 @@ MODULE_PARM_DESC(gts, "Enable evaluation
> >  MODULE_PARM_DESC(bfs, "Enable evaluation of _BFS on resume".);
> >  
> >  static u8 sleep_states[ACPI_S_STATE_COUNT];
> > -static bool pwr_btn_event_pending;
> >  
> >  static void acpi_sleep_tts_switch(u32 acpi_state)
> >  {
> > @@ -110,6 +109,7 @@ static int acpi_sleep_prepare(u32 acpi_s
> >  
> >  #ifdef CONFIG_ACPI_SLEEP
> >  static u32 acpi_target_sleep_state = ACPI_STATE_S0;
> > +static bool pwr_btn_event_pending;
> >  
> >  /*
> >   * The ACPI specification wants us to save NVS memory regions during hibernation
> > 
> 
> 
> 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Resend][PATCH] ACPI / PM: Fix build warning in sleep.c for CONFIG_ACPI_SLEEP unset
  2012-07-22 20:28             ` Paul E. McKenney
  (?)
  (?)
@ 2012-07-23 19:01             ` Rafael J. Wysocki
  2012-07-23 19:29               ` Paul E. McKenney
  -1 siblings, 1 reply; 16+ messages in thread
From: Rafael J. Wysocki @ 2012-07-23 19:01 UTC (permalink / raw)
  To: lenb; +Cc: paulmck, Kirill A. Shutemov, linux-acpi, linux-kernel, Linux PM list


If CONFIG_ACPI_SLEEP is unset, the compiler complains that
pwr_btn_event_pending is defined but not used.  To silence the
warning, move the definition of pwr_btn_event_pending under an
appropriate #ifdef.

Reported-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/acpi/sleep.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/drivers/acpi/sleep.c
===================================================================
--- linux.orig/drivers/acpi/sleep.c
+++ linux/drivers/acpi/sleep.c
@@ -57,7 +57,6 @@ MODULE_PARM_DESC(gts, "Enable evaluation
 MODULE_PARM_DESC(bfs, "Enable evaluation of _BFS on resume".);
 
 static u8 sleep_states[ACPI_S_STATE_COUNT];
-static bool pwr_btn_event_pending;
 
 static void acpi_sleep_tts_switch(u32 acpi_state)
 {
@@ -110,6 +109,7 @@ static int acpi_sleep_prepare(u32 acpi_s
 
 #ifdef CONFIG_ACPI_SLEEP
 static u32 acpi_target_sleep_state = ACPI_STATE_S0;
+static bool pwr_btn_event_pending;
 
 /*
  * The ACPI specification wants us to save NVS memory regions during hibernation

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Resend][PATCH] ACPI / PM: Fix build warning in sleep.c for CONFIG_ACPI_SLEEP unset
  2012-07-23 19:01             ` [Resend][PATCH] ACPI / PM: Fix build warning in sleep.c for CONFIG_ACPI_SLEEP unset Rafael J. Wysocki
@ 2012-07-23 19:29               ` Paul E. McKenney
  2012-07-26 23:28                 ` Len Brown
  0 siblings, 1 reply; 16+ messages in thread
From: Paul E. McKenney @ 2012-07-23 19:29 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: lenb, Kirill A. Shutemov, linux-acpi, linux-kernel, Linux PM list

On Mon, Jul 23, 2012 at 09:01:02PM +0200, Rafael J. Wysocki wrote:
> 
> If CONFIG_ACPI_SLEEP is unset, the compiler complains that
> pwr_btn_event_pending is defined but not used.  To silence the
> warning, move the definition of pwr_btn_event_pending under an
> appropriate #ifdef.
> 
> Reported-by: Paul E. McKenney <paul.mckenney@linaro.org>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

Tested-by: Paul E. McKenney <paul.mckenney@linaro.org>

> ---
>  drivers/acpi/sleep.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux/drivers/acpi/sleep.c
> ===================================================================
> --- linux.orig/drivers/acpi/sleep.c
> +++ linux/drivers/acpi/sleep.c
> @@ -57,7 +57,6 @@ MODULE_PARM_DESC(gts, "Enable evaluation
>  MODULE_PARM_DESC(bfs, "Enable evaluation of _BFS on resume".);
> 
>  static u8 sleep_states[ACPI_S_STATE_COUNT];
> -static bool pwr_btn_event_pending;
> 
>  static void acpi_sleep_tts_switch(u32 acpi_state)
>  {
> @@ -110,6 +109,7 @@ static int acpi_sleep_prepare(u32 acpi_s
> 
>  #ifdef CONFIG_ACPI_SLEEP
>  static u32 acpi_target_sleep_state = ACPI_STATE_S0;
> +static bool pwr_btn_event_pending;
> 
>  /*
>   * The ACPI specification wants us to save NVS memory regions during hibernation
> 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Resend][PATCH] ACPI / PM: Fix build warning in sleep.c for CONFIG_ACPI_SLEEP unset
  2012-07-23 19:29               ` Paul E. McKenney
@ 2012-07-26 23:28                 ` Len Brown
  0 siblings, 0 replies; 16+ messages in thread
From: Len Brown @ 2012-07-26 23:28 UTC (permalink / raw)
  To: paulmck
  Cc: Rafael J. Wysocki, Kirill A. Shutemov, linux-acpi, linux-kernel,
	Linux PM list

Applied.

thanks,
Len Brown, Intel Open Source Technology Center


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-07-26 23:28 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-21 21:41 [PATCH] acpi: fix pwr_btn_event_pending build error Paul E. McKenney
2012-07-21 21:41 ` Paul E. McKenney
2012-07-21 21:52 ` Kirill A. Shutemov
2012-07-21 23:37   ` Paul E. McKenney
2012-07-22  0:08     ` Kirill A. Shutemov
2012-07-22  4:10       ` Paul E. McKenney
2012-07-22  4:10         ` Paul E. McKenney
2012-07-22 17:40         ` Rafael J. Wysocki
2012-07-22 17:40           ` Rafael J. Wysocki
2012-07-22 20:28           ` Paul E. McKenney
2012-07-22 20:28             ` Paul E. McKenney
2012-07-23 18:58             ` Rafael J. Wysocki
2012-07-23 18:58               ` Rafael J. Wysocki
2012-07-23 19:01             ` [Resend][PATCH] ACPI / PM: Fix build warning in sleep.c for CONFIG_ACPI_SLEEP unset Rafael J. Wysocki
2012-07-23 19:29               ` Paul E. McKenney
2012-07-26 23:28                 ` Len Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.