]> 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>
Fri, 16 Dec 2011 04:50:43 +0000 (15:50 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 19 Dec 2011 07:19:54 +0000 (18:19 +1100)
commit112a2686eb33440325542e66765b5712b9821925
tree70417e94095e3ef14ee674f6cf4b8d06719e0e89
parent87155bb52e3359add721acc7ac823ac828e97dd6
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