dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/drivers/infiniband/hw/nes
Tejun Heo 41f63c5359 workqueue: use mod_delayed_work() instead of cancel + queue
Convert delayed_work users doing cancel_delayed_work() followed by
queue_delayed_work() to mod_delayed_work().

Most conversions are straight-forward.  Ones worth mentioning are,

* drivers/edac/edac_mc.c: edac_mc_workq_setup() converted to always
  use mod_delayed_work() and cancel loop in
  edac_mc_reset_delay_period() is dropped.

* drivers/platform/x86/thinkpad_acpi.c: No need to remember whether
  watchdog is active or not.  @fan_watchdog_active and related code
  dropped.

* drivers/power/charger-manager.c: Seemingly a lot of
  delayed_work_pending() abuse going on here.
  [delayed_]work_pending() are unsynchronized and racy when used like
  this.  I converted one instance in fullbatt_handler().  Please
  conver the rest so that it invokes workqueue APIs for the intended
  target state rather than trying to game work item pending state
  transitions.  e.g. if timer should be modified - call
  mod_delayed_work(), canceled - call cancel_delayed_work[_sync]().

* drivers/thermal/thermal_sys.c: thermal_zone_device_set_polling()
  simplified.  Note that round_jiffies() calls in this function are
  meaningless.  round_jiffies() work on absolute jiffies not delta
  delay used by delayed_work.

v2: Tomi pointed out that __cancel_delayed_work() users can't be
    safely converted to mod_delayed_work().  They could be calling it
    from irq context and if that happens while delayed_work_timer_fn()
    is running, it could deadlock.  __cancel_delayed_work() users are
    dropped.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Acked-by: David Howells <dhowells@redhat.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Doug Thompson <dougthompson@xmission.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Roland Dreier <roland@kernel.org>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Len Brown <len.brown@intel.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
2012-08-13 16:27:37 -07:00
..
Kconfig RDMA/nes: Update copyright and branding string 2009-12-09 15:21:56 -08:00
Makefile RDMA/nes: Support for Packed And Unaligned fpdus 2011-10-10 10:54:47 -07:00
nes.c RDMA/nes: Copyright update 2012-01-30 16:18:07 -08:00
nes.h RDMA/nes: Copyright update 2012-01-30 16:18:07 -08:00
nes_cm.c RDMA/nes: Don't call event handler if pointer is NULL 2012-05-14 12:48:07 -07:00
nes_cm.h RDMA/nes: Copyright update 2012-01-30 16:18:07 -08:00
nes_context.h RDMA/nes: Copyright update 2012-01-30 16:18:07 -08:00
nes_hw.c workqueue: use mod_delayed_work() instead of cancel + queue 2012-08-13 16:27:37 -07:00
nes_hw.h RDMA/nes: Copyright update 2012-01-30 16:18:07 -08:00
nes_mgt.c RDMA/nes: Copyright update 2012-01-30 16:18:07 -08:00
nes_mgt.h RDMA/nes: Copyright update 2012-01-30 16:18:07 -08:00
nes_nic.c workqueue: use mod_delayed_work() instead of cancel + queue 2012-08-13 16:27:37 -07:00
nes_user.h RDMA/nes: Copyright update 2012-01-30 16:18:07 -08:00
nes_utils.c RDMA/nes: Copyright update 2012-01-30 16:18:07 -08:00
nes_verbs.c IB: Use central enum for speed instead of hard-coded values 2012-03-05 09:25:16 -08:00
nes_verbs.h RDMA/nes: Copyright update 2012-01-30 16:18:07 -08:00