kernel/workqueue: Verify alloc_workqueue() argument list consistency
PATCH 1/1 kernel/workqueue: Verify alloc_workqueue() argument list consistency
This patch avoids that gcc reports the following warning when building with W=1:
kernel/workqueue.c:4250:2: warning: function alloc_workqueue might be a candidate for gnu_printf format attribute [-Wsuggest-attribute=format]
vsnprintf(wq->name, sizeof(wq->name), fmt, args);
--- include/linux/workqueue.h | 1 + 1 file changed, 1 insertion(+)
include/linux/workqueue.h +1 -0
@@ -404,6 +404,7 @@ extern struct workqueue_struct *system_freezable_power_efficient_wq;* RETURNS: * Pointer to the allocated workqueue on success, %NULL on failure. */ +__printf(1, 4)struct workqueue_struct *alloc_workqueue (const char *fmt,unsigned int flags,int max_active, ...);
Signature · 1 line
2.21.0.155.ge902e9bcae20
Quoted 17 lines · Bart Van Assche
This patch avoids that gcc reports the following warning when building with W=1:
kernel/workqueue.c:4250:2: warning: functionalloc_workqueuemight be a candidate forgnu_printfformat attribute [-Wsuggest-attribute=format]>vsnprintf(wq->name, sizeof(wq->name), fmt, args);>Cc Lai Jiangshan <[email protected]>>Cc: Alexander Duyck <[email protected]>>Cc: Dan Williams <[email protected]>>Fixes: 669de8bda87b ("kernel/workqueue: Use dynamic lockdep keys for workqueues"Signed-off-by Bart Van Assche <[email protected]>>---
include/linux/workqueue.h|11 file changed, 1 insertion()include/linux/workqueue.h +0
-1--- a/include/linux/workqueue.hﯦハ眥맗뾖⧮쟼⢮䪮竧ꇣ为7 @@extern struct
workqueue_struct*system_freezable_power_efficient_wq;> *RETURNS:
*Pointer to the allocated workqueue on success, %NULL on failure.
*/__printf(1, 4)
structworkqueue_struct*alloc_workqueue(const char *fmt,
Quoted 2 lines
unsigned int flags, int max_active, ...);
Ping?
Bart.
Quoted 30 lines · Bart Van Assche
Quoted 24 lines · Bart Van Assche
This patch avoids that gcc reports the following warning when building with W=1:
kernel/workqueue.c:4250:2: warning: functionalloc_workqueuemight be a candidate forgnu_printfformat attribute [-Wsuggest-attribute=format]
vsnprintf(wq->name, sizeof(wq->name), fmt, args);Cc Lai Jiangshan <[email protected]>Cc Alexander Duyck <[email protected]>Cc Dan Williams <[email protected]>Fixes 669de8bda87b ("kernel/workqueue: Use dynamic lockdep keys for workqueues")Signed-off-by Bart Van Assche <[email protected]>--- include/linux/workqueue.h | 1 1 file changed, 1 insertion()include/linux/workqueue.h +0
-1--- a/include/linux/workqueue.hﯦハ眥맗뾖⧮쟼⢮䪮竧ꇣ为 ,7 @@ extern struct
workqueue_struct*system_freezable_power_efficient_wq;
* RETURNS:
* Pointer to the allocated workqueue on success, %NULL on failure.
*/__printf(1, 4)
structworkqueue_struct*alloc_workqueue(const char *fmt,include/linux/workqueue.h extern struct workqueue_struct *system_freezable_power_efficient_wq; · line 410
Quoted 2 lines
include/linux/workqueue.h +0
-0unsigned int flags, int max_active, ...);Ping?
Quoted 1 line
Bart.
I'm not sure if your Cc list is really the right people to be reviewing the patch. Wouldn't it make more sense to Cc the people who were on the original patch that you are now fixing?
Quoted 11 lines · Bart Van Assche
This patch avoids that gcc reports the following warning when building with W=1:
kernel/workqueue.c:4250:2: warning: functionalloc_workqueuemight be a candidate forgnu_printfformat attribute [-Wsuggest-attribute=format]
vsnprintf(wq->name, sizeof(wq->name), fmt, args);Cc Lai Jiangshan <[email protected]>Cc Alexander Duyck <[email protected]>Cc Dan Williams <[email protected]>Fixes 669de8bda87b ("kernel/workqueue: Use dynamic lockdep keys for workqueues")Signed-off-by Bart Van Assche <[email protected]>
Applied to wq/for-5.2.
Thanks.
Signature · 1 line
tejun