Re: [PATCH] printf: add __printf attribute
From: kernel test robot
Date: Sat Dec 06 2025 - 21:22:17 EST
Hi Tamir,
kernel test robot noticed the following build errors:
[auto build test ERROR on 559e608c46553c107dbba19dae0854af7b219400]
url: https://github.com/intel-lab-lkp/linux/commits/Tamir-Duberstein/printf-add-__printf-attribute/20251206-212115
base: 559e608c46553c107dbba19dae0854af7b219400
patch link: https://lore.kernel.org/r/20251206-printf-kunit-printf-attr-v1-1-1682808b51d0%40gmail.com
patch subject: [PATCH] printf: add __printf attribute
config: um-allyesconfig (https://download.01.org/0day-ci/archive/20251207/202512070958.HMqvski6-lkp@xxxxxxxxx/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251207/202512070958.HMqvski6-lkp@xxxxxxxxx/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 <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512070958.HMqvski6-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
>> lib/tests/printf_kunit.c:271:1: error: 'format' attribute argument 3 value '3' does not refer to a variable argument list
271 | {
| ^
vim +271 lib/tests/printf_kunit.c
707cc7280f452a lib/test_printf.c Rasmus Villemoes 2015-11-06 268
c23bf7282349cc lib/tests/printf_kunit.c Tamir Duberstein 2025-12-06 269 static void __printf(2, 3)
81a03aa9b88c5d lib/tests/printf_kunit.c Tamir Duberstein 2025-03-07 270 test_hashed(struct kunit *kunittest, const char *fmt, const void *p)
4d42c44727a062 lib/test_printf.c Andy Shevchenko 2018-12-04 @271 {
4d42c44727a062 lib/test_printf.c Andy Shevchenko 2018-12-04 272 char buf[PLAIN_BUF_SIZE];
4d42c44727a062 lib/test_printf.c Andy Shevchenko 2018-12-04 273
81a03aa9b88c5d lib/tests/printf_kunit.c Tamir Duberstein 2025-03-07 274 plain_hash_to_buffer(kunittest, p, buf, PLAIN_BUF_SIZE);
4d42c44727a062 lib/test_printf.c Andy Shevchenko 2018-12-04 275
4d42c44727a062 lib/test_printf.c Andy Shevchenko 2018-12-04 276 test(buf, fmt, p);
4d42c44727a062 lib/test_printf.c Andy Shevchenko 2018-12-04 277 }
4d42c44727a062 lib/test_printf.c Andy Shevchenko 2018-12-04 278
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki