diff options
author | Su Hui <suhui@nfschina.com> | 2024-12-24 05:43:58 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2024-12-24 20:50:38 +0100 |
commit | d57212f281fda9056412cd6cca983d9d2eb89f53 (patch) | |
tree | 421d1b280685ce4a43b05e87a793ef3383c185c6 /kernel | |
parent | workqueue: Do not warn when cancelling WQ_MEM_RECLAIM work from !WQ_MEM_RECLA... (diff) | |
download | linux-d57212f281fda9056412cd6cca983d9d2eb89f53.tar.xz linux-d57212f281fda9056412cd6cca983d9d2eb89f53.zip |
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: 9b59a85a84dc ("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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/workqueue.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 8336218ec4b8..f7d8fc204579 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -5645,6 +5645,7 @@ static void wq_adjust_max_active(struct workqueue_struct *wq) } while (activated); } +__printf(1, 0) static struct workqueue_struct *__alloc_workqueue(const char *fmt, unsigned int flags, int max_active, va_list args) |