[lkml]   [2019]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] 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);

Cc: Lai Jiangshan <>
Cc: Alexander Duyck <>
Cc: Dan Williams <>
Fixes: 669de8bda87b ("kernel/workqueue: Use dynamic lockdep keys for workqueues")
Signed-off-by: Bart Van Assche <>
include/linux/workqueue.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index d59525fca4d3..30737b5183c0 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -404,6 +404,7 @@ extern struct workqueue_struct *system_freezable_power_efficient_wq;
* 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, ...);
 \ /
  Last update: 2019-03-19 18:41    [W:0.045 / U:5.224 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site