mirror of
https://github.com/torvalds/linux.git
synced 2025-12-01 07:26:02 +07:00
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: 9b59a85a84 ("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>
This commit is contained in:
@@ -5645,6 +5645,7 @@ static void wq_adjust_max_active(struct workqueue_struct *wq)
|
|||||||
} while (activated);
|
} while (activated);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__printf(1, 0)
|
||||||
static struct workqueue_struct *__alloc_workqueue(const char *fmt,
|
static struct workqueue_struct *__alloc_workqueue(const char *fmt,
|
||||||
unsigned int flags,
|
unsigned int flags,
|
||||||
int max_active, va_list args)
|
int max_active, va_list args)
|
||||||
|
|||||||
Reference in New Issue
Block a user