kernel/workqueue.c:5916:53: warning: diagnostic behavior may be improved by adding the 'format(printf, 1, 0)' attribute to the declaration of 'alloc_workqueue_va'
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-7.1-fixes head: 0de4cb473aed57ee4ba7e0551ad27bddc19fc519 commit: 0de4cb473aed57ee4ba7e0551ad27bddc19fc519 [1/1] workqueue: fix devm_alloc_workqueue() va_list misuse config: arm-allnoconfig (https://download.01.org/0day-ci/archive/20260430/[email protected]/config) compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260430/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
>> kernel/workqueue.c:5916:53: warning: diagnostic behavior may be improved by adding the 'format(printf, 1, 0)' attribute to the declaration of 'alloc_workqueue_va' [-Wmissing-format-attribute]
5909 | static struct workqueue_struct *alloc_workqueue_va(const char *fmt,
| __attribute__((format(printf, 1, 0)))
5910 | unsigned int flags,
5911 | int max_active,
5912 | va_list args)
5913 | {
5914 | struct workqueue_struct *wq;
5915 |
5916 | wq = __alloc_workqueue(fmt, flags, max_active, args);
| ^ kernel/workqueue.c:5909:33: note: 'alloc_workqueue_va' declared here
5909 | static struct workqueue_struct *alloc_workqueue_va(const char *fmt,
| ^
1 warning generated.
vim +5916 kernel/workqueue.c
5908
5909 static struct workqueue_struct *alloc_workqueue_va(const char *fmt,
5910 unsigned int flags,
5911 int max_active,
5912 va_list args)
5913 {
5914 struct workqueue_struct *wq;
5915
> 5916 wq = __alloc_workqueue(fmt, flags, max_active, args); 5917 if (wq)
5918 wq_init_lockdep(wq);
5919
5920 return wq;
5921 }
5922
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki