Skip to content

Commit 0e394dd

Browse files
Su Huigregkh
authored andcommitted
workqueue: add printf attribute to __alloc_workqueue()
[ Upstream commit d57212f ] Fix a compiler warning with W=1: kernel/workqueue.c: error: function ‘__alloc_workqueue’ might be a candidate for ‘gnu_printf’ format attribute[-Werror=suggest-attribute=format] 5657 | name_len = vsnprintf(wq->name, sizeof(wq->name), fmt, args); | ^~~~~~~~ Fixes: 9b59a85 ("workqueue: Don't call va_start / va_end twice") Signed-off-by: Su Hui <[email protected]> Signed-off-by: Tejun Heo <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent a0360b9 commit 0e394dd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/workqueue.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5627,6 +5627,7 @@ static void wq_adjust_max_active(struct workqueue_struct *wq)
56275627
} while (activated);
56285628
}
56295629

5630+
__printf(1, 0)
56305631
static struct workqueue_struct *__alloc_workqueue(const char *fmt,
56315632
unsigned int flags,
56325633
int max_active, va_list args)

0 commit comments

Comments
 (0)