* [PATCH] ACPI: Simplify conditional that has the same effect no matter what.
@ 2012-10-22 21:40 Robert P. J. Day
2012-10-22 22:30 ` Rafael J. Wysocki
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Robert P. J. Day @ 2012-10-22 21:40 UTC (permalink / raw)
To: linux-acpi; +Cc: lenb, rjw
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
---
not sure if there's something weirdly subtle happening here, but
this looks like a straightforward simplification.
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 9eaf708..e76a7f5 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -949,12 +949,7 @@ static acpi_status __acpi_os_execute(acpi_execute_type type,
(type == OSL_NOTIFY_HANDLER ? kacpi_notify_wq : kacpid_wq);
dpc->wait = hp ? 1 : 0;
- if (queue == kacpi_hotplug_wq)
- INIT_WORK(&dpc->work, acpi_os_execute_deferred);
- else if (queue == kacpi_notify_wq)
- INIT_WORK(&dpc->work, acpi_os_execute_deferred);
- else
- INIT_WORK(&dpc->work, acpi_os_execute_deferred);
+ INIT_WORK(&dpc->work, acpi_os_execute_deferred);
/*
* On some machines, a software-initiated SMI causes corruption unless
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ACPI: Simplify conditional that has the same effect no matter what.
2012-10-22 21:40 [PATCH] ACPI: Simplify conditional that has the same effect no matter what Robert P. J. Day
@ 2012-10-22 22:30 ` Rafael J. Wysocki
2012-10-23 2:27 ` Matthew Garrett
2012-10-24 22:19 ` Rafael J. Wysocki
2 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2012-10-22 22:30 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: linux-acpi, lenb
On Monday 22 of October 2012 17:40:36 Robert P. J. Day wrote:
>
> Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
I recall having an identical patch in my queue for v3.8. If it's not there
after all, I'll take yours.
Thanks,
Rafael
> ---
>
> not sure if there's something weirdly subtle happening here, but
> this looks like a straightforward simplification.
>
> diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
> index 9eaf708..e76a7f5 100644
> --- a/drivers/acpi/osl.c
> +++ b/drivers/acpi/osl.c
> @@ -949,12 +949,7 @@ static acpi_status __acpi_os_execute(acpi_execute_type type,
> (type == OSL_NOTIFY_HANDLER ? kacpi_notify_wq : kacpid_wq);
> dpc->wait = hp ? 1 : 0;
>
> - if (queue == kacpi_hotplug_wq)
> - INIT_WORK(&dpc->work, acpi_os_execute_deferred);
> - else if (queue == kacpi_notify_wq)
> - INIT_WORK(&dpc->work, acpi_os_execute_deferred);
> - else
> - INIT_WORK(&dpc->work, acpi_os_execute_deferred);
> + INIT_WORK(&dpc->work, acpi_os_execute_deferred);
>
> /*
> * On some machines, a software-initiated SMI causes corruption unless
>
>
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ACPI: Simplify conditional that has the same effect no matter what.
2012-10-22 21:40 [PATCH] ACPI: Simplify conditional that has the same effect no matter what Robert P. J. Day
2012-10-22 22:30 ` Rafael J. Wysocki
@ 2012-10-23 2:27 ` Matthew Garrett
2012-10-24 21:23 ` Rafael J. Wysocki
2012-10-24 22:19 ` Rafael J. Wysocki
2 siblings, 1 reply; 5+ messages in thread
From: Matthew Garrett @ 2012-10-23 2:27 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: linux-acpi, lenb, rjw
On Mon, Oct 22, 2012 at 05:40:36PM -0400, Robert P. J. Day wrote:
> not sure if there's something weirdly subtle happening here, but
> this looks like a straightforward simplification.
There is - it provides a hint to lockdep, but it should probably have a
comment explaining it. See
https://bugzilla.kernel.org/show_bug.cgi?id=14553
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ACPI: Simplify conditional that has the same effect no matter what.
2012-10-23 2:27 ` Matthew Garrett
@ 2012-10-24 21:23 ` Rafael J. Wysocki
0 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2012-10-24 21:23 UTC (permalink / raw)
To: Matthew Garrett; +Cc: Robert P. J. Day, linux-acpi, lenb
On Tuesday 23 of October 2012 03:27:27 Matthew Garrett wrote:
> On Mon, Oct 22, 2012 at 05:40:36PM -0400, Robert P. J. Day wrote:
>
> > not sure if there's something weirdly subtle happening here, but
> > this looks like a straightforward simplification.
>
> There is - it provides a hint to lockdep, but it should probably have a
> comment explaining it. See
> https://bugzilla.kernel.org/show_bug.cgi?id=14553
I wonder if it still is needed, though? The way it worked was by providing
a different key for the work item depending on which workqueue was to be
used, but now we don't do anything like this any more.
Thanks,
Rafael
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ACPI: Simplify conditional that has the same effect no matter what.
2012-10-22 21:40 [PATCH] ACPI: Simplify conditional that has the same effect no matter what Robert P. J. Day
2012-10-22 22:30 ` Rafael J. Wysocki
2012-10-23 2:27 ` Matthew Garrett
@ 2012-10-24 22:19 ` Rafael J. Wysocki
2 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2012-10-24 22:19 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: linux-acpi, lenb, Feng Tang
On Monday 22 of October 2012 17:40:36 Robert P. J. Day wrote:
>
> Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Tentatively applied an equivalent (but older) patch from Feng Tang to
linux-pm.git/acpi-next as v3.8 material.
Thanks,
Rafael
> ---
>
> not sure if there's something weirdly subtle happening here, but
> this looks like a straightforward simplification.
>
> diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
> index 9eaf708..e76a7f5 100644
> --- a/drivers/acpi/osl.c
> +++ b/drivers/acpi/osl.c
> @@ -949,12 +949,7 @@ static acpi_status __acpi_os_execute(acpi_execute_type type,
> (type == OSL_NOTIFY_HANDLER ? kacpi_notify_wq : kacpid_wq);
> dpc->wait = hp ? 1 : 0;
>
> - if (queue == kacpi_hotplug_wq)
> - INIT_WORK(&dpc->work, acpi_os_execute_deferred);
> - else if (queue == kacpi_notify_wq)
> - INIT_WORK(&dpc->work, acpi_os_execute_deferred);
> - else
> - INIT_WORK(&dpc->work, acpi_os_execute_deferred);
> + INIT_WORK(&dpc->work, acpi_os_execute_deferred);
>
> /*
> * On some machines, a software-initiated SMI causes corruption unless
>
>
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-10-24 22:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-22 21:40 [PATCH] ACPI: Simplify conditional that has the same effect no matter what Robert P. J. Day
2012-10-22 22:30 ` Rafael J. Wysocki
2012-10-23 2:27 ` Matthew Garrett
2012-10-24 21:23 ` Rafael J. Wysocki
2012-10-24 22:19 ` Rafael J. Wysocki
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.