Skip to content

Commit d57212f

Browse files
Su Huihtejun
authored andcommitted
workqueue: add printf attribute to __alloc_workqueue()
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 <suhui@nfschina.com> Signed-off-by: Tejun Heo <tj@kernel.org>
1 parent de35994 commit d57212f

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
@@ -5645,6 +5645,7 @@ static void wq_adjust_max_active(struct workqueue_struct *wq)
56455645
} while (activated);
56465646
}
56475647

5648+
__printf(1, 0)
56485649
static struct workqueue_struct *__alloc_workqueue(const char *fmt,
56495650
unsigned int flags,
56505651
int max_active, va_list args)

0 commit comments

Comments
 (0)