* [PATCH 08/25] thinkpad_acpi: don't use [delayed_]work_pending() [not found] <1356141435-17340-1-git-send-email-tj@kernel.org> @ 2012-12-22 1:56 ` Tejun Heo [not found] ` <1356141435-17340-9-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Tejun Heo @ 2012-12-22 1:56 UTC (permalink / raw) To: linux-kernel Cc: Tejun Heo, Henrique de Moraes Holschuh, ibm-acpi-devel, platform-driver-x86 There's no need to test whether a (delayed) work item in pending before queueing, flushing or cancelling it. Most uses are unnecessary and quite a few of them are buggy. Remove unnecessary pending tests from thinkpad_acpi. Only compile tested. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br> Cc: ibm-acpi-devel@lists.sourceforge.net Cc: platform-driver-x86@vger.kernel.org --- Please let me know how this patch should be routed. I can take it through the workqueue tree if necessary. Thanks. drivers/platform/x86/thinkpad_acpi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 75dd651..8421d1e 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -4877,8 +4877,7 @@ static int __init light_init(struct ibm_init_struct *iibm) static void light_exit(void) { led_classdev_unregister(&tpacpi_led_thinklight.led_classdev); - if (work_pending(&tpacpi_led_thinklight.work)) - flush_workqueue(tpacpi_wq); + flush_workqueue(tpacpi_wq); } static int light_read(struct seq_file *m) -- 1.8.0.2 ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <1356141435-17340-9-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>]
* Re: [PATCH 08/25] thinkpad_acpi: don't use [delayed_]work_pending() [not found] ` <1356141435-17340-9-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> @ 2012-12-22 23:55 ` Henrique de Moraes Holschuh 2012-12-28 21:41 ` Tejun Heo 0 siblings, 1 reply; 3+ messages in thread From: Henrique de Moraes Holschuh @ 2012-12-22 23:55 UTC (permalink / raw) To: Tejun Heo Cc: ibm-acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Henrique de Moraes Holschuh, linux-kernel-u79uwXL29TY76Z2rM5mHXA, platform-driver-x86-u79uwXL29TY76Z2rM5mHXA On Fri, 21 Dec 2012, Tejun Heo wrote: > There's no need to test whether a (delayed) work item in pending > before queueing, flushing or cancelling it. Most uses are unnecessary > and quite a few of them are buggy. > > Remove unnecessary pending tests from thinkpad_acpi. Only compile > tested. > > Signed-off-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> > Cc: Henrique de Moraes Holschuh <ibm-acpi-N3TV7GIv+o9fyO9Q7EP/yw@public.gmane.org> > Cc: ibm-acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > Cc: platform-driver-x86-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Acked-by: Henrique de Moraes Holschuh <hmh-N3TV7GIv+o9fyO9Q7EP/yw@public.gmane.org> > --- > Please let me know how this patch should be routed. I can take it > through the workqueue tree if necessary. It will not clash with anything I know of, so feel free to route it through the workqueue tree. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 08/25] thinkpad_acpi: don't use [delayed_]work_pending() 2012-12-22 23:55 ` Henrique de Moraes Holschuh @ 2012-12-28 21:41 ` Tejun Heo 0 siblings, 0 replies; 3+ messages in thread From: Tejun Heo @ 2012-12-28 21:41 UTC (permalink / raw) To: Henrique de Moraes Holschuh Cc: linux-kernel, Henrique de Moraes Holschuh, ibm-acpi-devel, platform-driver-x86 On Sat, Dec 22, 2012 at 09:55:04PM -0200, Henrique de Moraes Holschuh wrote: > On Fri, 21 Dec 2012, Tejun Heo wrote: > > There's no need to test whether a (delayed) work item in pending > > before queueing, flushing or cancelling it. Most uses are unnecessary > > and quite a few of them are buggy. > > > > Remove unnecessary pending tests from thinkpad_acpi. Only compile > > tested. > > > > Signed-off-by: Tejun Heo <tj@kernel.org> > > Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br> > > Cc: ibm-acpi-devel@lists.sourceforge.net > > Cc: platform-driver-x86@vger.kernel.org > > Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> > > > --- > > Please let me know how this patch should be routed. I can take it > > through the workqueue tree if necessary. > > It will not clash with anything I know of, so feel free to route it > through the workqueue tree. Applied to wq/for-3.9-cleanups. Thanks. -- tejun ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-12-28 21:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1356141435-17340-1-git-send-email-tj@kernel.org>
2012-12-22 1:56 ` [PATCH 08/25] thinkpad_acpi: don't use [delayed_]work_pending() Tejun Heo
[not found] ` <1356141435-17340-9-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-12-22 23:55 ` Henrique de Moraes Holschuh
2012-12-28 21:41 ` Tejun Heo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox