* [PATCH] ACPI: clean up compiler warning about uninitialized field
@ 2013-11-20 22:45 al.stone
2013-11-21 0:34 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: al.stone @ 2013-11-20 22:45 UTC (permalink / raw)
To: linux-acpi; +Cc: linaro-acpi, patches, Al Stone, Al Stone
From: Al Stone <ahs3@redhat.com>
Initialize pwr_btn_status as disabled which (a) makes sure it is
in a proper state to start, and (b) cleans up a compiler warning
about an uninitialized variable.
Signed-off-by: Al Stone <al.stone@linaro.org>
---
drivers/acpi/sleep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 14df305..721e949 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -525,7 +525,7 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
* generate wakeup events.
*/
if (ACPI_SUCCESS(status) && (acpi_state == ACPI_STATE_S3)) {
- acpi_event_status pwr_btn_status;
+ acpi_event_status pwr_btn_status = ACPI_EVENT_FLAG_DISABLED;
acpi_get_event_status(ACPI_EVENT_POWER_BUTTON, &pwr_btn_status);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ACPI: clean up compiler warning about uninitialized field
2013-11-20 22:45 [PATCH] ACPI: clean up compiler warning about uninitialized field al.stone
@ 2013-11-21 0:34 ` Rafael J. Wysocki
2013-11-21 0:43 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2013-11-21 0:34 UTC (permalink / raw)
To: al.stone; +Cc: linux-acpi, linaro-acpi, patches, Al Stone
On Wednesday, November 20, 2013 03:45:51 PM al.stone@linaro.org wrote:
> From: Al Stone <ahs3@redhat.com>
>
> Initialize pwr_btn_status as disabled which (a) makes sure it is
> in a proper state to start, and (b) cleans up a compiler warning
> about an uninitialized variable.
>
> Signed-off-by: Al Stone <al.stone@linaro.org>
Queued up for the next ACPI pull request, thanks!
> ---
> drivers/acpi/sleep.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
> index 14df305..721e949 100644
> --- a/drivers/acpi/sleep.c
> +++ b/drivers/acpi/sleep.c
> @@ -525,7 +525,7 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
> * generate wakeup events.
> */
> if (ACPI_SUCCESS(status) && (acpi_state == ACPI_STATE_S3)) {
> - acpi_event_status pwr_btn_status;
> + acpi_event_status pwr_btn_status = ACPI_EVENT_FLAG_DISABLED;
>
> acpi_get_event_status(ACPI_EVENT_POWER_BUTTON, &pwr_btn_status);
>
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ACPI: clean up compiler warning about uninitialized field
2013-11-21 0:43 ` Rafael J. Wysocki
@ 2013-11-21 0:42 ` Al Stone
0 siblings, 0 replies; 4+ messages in thread
From: Al Stone @ 2013-11-21 0:42 UTC (permalink / raw)
To: Rafael J. Wysocki, al.stone; +Cc: linux-acpi, linaro-acpi
On 11/20/2013 05:43 PM, Rafael J. Wysocki wrote:
> On Thursday, November 21, 2013 01:34:37 AM Rafael J. Wysocki wrote:
>> On Wednesday, November 20, 2013 03:45:51 PM al.stone@linaro.org wrote:
>>> From: Al Stone <ahs3@redhat.com>
>
> BTW, is it your intention to use different addresses for From: and
> Signed-off-by?
>
> I don't think it is formally invalid, but it certainly *is* confusing.
Ah, no, that was not the intent. I'll fix my config problem.
>>> Initialize pwr_btn_status as disabled which (a) makes sure it is
>>> in a proper state to start, and (b) cleans up a compiler warning
>>> about an uninitialized variable.
>>>
>>> Signed-off-by: Al Stone <al.stone@linaro.org>
>>
>> Queued up for the next ACPI pull request, thanks!
>>
>>> ---
>>> drivers/acpi/sleep.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
>>> index 14df305..721e949 100644
>>> --- a/drivers/acpi/sleep.c
>>> +++ b/drivers/acpi/sleep.c
>>> @@ -525,7 +525,7 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
>>> * generate wakeup events.
>>> */
>>> if (ACPI_SUCCESS(status) && (acpi_state == ACPI_STATE_S3)) {
>>> - acpi_event_status pwr_btn_status;
>>> + acpi_event_status pwr_btn_status = ACPI_EVENT_FLAG_DISABLED;
>>>
>>> acpi_get_event_status(ACPI_EVENT_POWER_BUTTON, &pwr_btn_status);
>>>
>>>
>>
--
ciao,
al
-----------------------------------
Al Stone
Software Engineer
Red Hat, Inc.
ahs3@redhat.com
-----------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ACPI: clean up compiler warning about uninitialized field
2013-11-21 0:34 ` Rafael J. Wysocki
@ 2013-11-21 0:43 ` Rafael J. Wysocki
2013-11-21 0:42 ` Al Stone
0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2013-11-21 0:43 UTC (permalink / raw)
To: al.stone; +Cc: linux-acpi, linaro-acpi, Al Stone
On Thursday, November 21, 2013 01:34:37 AM Rafael J. Wysocki wrote:
> On Wednesday, November 20, 2013 03:45:51 PM al.stone@linaro.org wrote:
> > From: Al Stone <ahs3@redhat.com>
BTW, is it your intention to use different addresses for From: and
Signed-off-by?
I don't think it is formally invalid, but it certainly *is* confusing.
> > Initialize pwr_btn_status as disabled which (a) makes sure it is
> > in a proper state to start, and (b) cleans up a compiler warning
> > about an uninitialized variable.
> >
> > Signed-off-by: Al Stone <al.stone@linaro.org>
>
> Queued up for the next ACPI pull request, thanks!
>
> > ---
> > drivers/acpi/sleep.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
> > index 14df305..721e949 100644
> > --- a/drivers/acpi/sleep.c
> > +++ b/drivers/acpi/sleep.c
> > @@ -525,7 +525,7 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
> > * generate wakeup events.
> > */
> > if (ACPI_SUCCESS(status) && (acpi_state == ACPI_STATE_S3)) {
> > - acpi_event_status pwr_btn_status;
> > + acpi_event_status pwr_btn_status = ACPI_EVENT_FLAG_DISABLED;
> >
> > acpi_get_event_status(ACPI_EVENT_POWER_BUTTON, &pwr_btn_status);
> >
> >
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-11-21 0:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-20 22:45 [PATCH] ACPI: clean up compiler warning about uninitialized field al.stone
2013-11-21 0:34 ` Rafael J. Wysocki
2013-11-21 0:43 ` Rafael J. Wysocki
2013-11-21 0:42 ` Al Stone
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).