]> git.karo-electronics.de Git - karo-tx-linux.git/commit
workqueue: make alloc_workqueue() take printf fmt and args for name
authorTejun Heo <tj@kernel.org>
Wed, 30 Nov 2011 04:12:02 +0000 (15:12 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 30 Nov 2011 04:14:07 +0000 (15:14 +1100)
commit621404a8b2e6d618c9855864eb67b918d5b331dc
treeac341f612e445e95077597367638681d8a1f3044
parentbe114b36de3b186f3ee0ca39a7c4f9f91a93e6f8
workqueue: make alloc_workqueue() take printf fmt and args for name

alloc_workqueue() currently expects the passed in @name pointer to remain
accessible.  This is inconvenient and a bit silly given that the whole wq
is being dynamically allocated.  This patch updates alloc_workqueue() and
friends to take printf format string instead of opaque string and matching
varargs at the end.  The name is allocated together with the wq and
formatted.

alloc_ordered_workqueue() is converted to a macro to unify varargs
handling with alloc_workqueue(), and, while at it, add comment to
alloc_workqueue().

None of the current in-kernel users pass in string with '%' as constant
name and this change shouldn't cause any problem.

Signed-off-by: Tejun Heo <tj@kernel.org>
Suggested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/workqueue.h
kernel/workqueue.c