arch/x86/platform/intel-quark/imr_selftest.c:30: warning: Function parameter or member '2' not described in '__printf'

From: kernel test robot
Date: Tue Dec 12 2023 - 19:17:09 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: cf52eed70e555e864120cfaf280e979e2a035c66
commit: 9120cf4fd9ae77245ce9137869bcbd16575cc633 x86/platform/intel/quark: Add printf attribute to imr_self_test_result()
date: 7 years ago
config: i386-randconfig-012-20231117 (https://download.01.org/0day-ci/archive/20231213/202312130848.I9egksGx-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231213/202312130848.I9egksGx-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/202312130848.I9egksGx-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

In file included from include/linux/kernel.h:11,
from include/asm-generic/bug.h:13,
from arch/x86/include/asm/bug.h:35,
from include/linux/bug.h:4,
from include/linux/mmdebug.h:4,
from include/linux/mm.h:8,
from arch/x86/platform/intel-quark/imr_selftest.c:17:
include/linux/log2.h:22:1: warning: ignoring attribute 'noreturn' because it conflicts with attribute 'const' [-Wattributes]
22 | int ____ilog2_NaN(void);
| ^~~
>> arch/x86/platform/intel-quark/imr_selftest.c:30: warning: Function parameter or member '2' not described in '__printf'
arch/x86/platform/intel-quark/imr_selftest.c:30: warning: Function parameter or member '3' not described in '__printf'
>> arch/x86/platform/intel-quark/imr_selftest.c:30: warning: Excess function parameter 'res' description in '__printf'
>> arch/x86/platform/intel-quark/imr_selftest.c:30: warning: Excess function parameter 'fmt' description in '__printf'
arch/x86/platform/intel-quark/imr_selftest.c:126: warning: Function parameter or member 'imr_self_test_init' not described in 'device_initcall'


vim +30 arch/x86/platform/intel-quark/imr_selftest.c

28a375df16c2b6 Bryan O'Donoghue 2015-01-30 19
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 20 #define SELFTEST KBUILD_MODNAME ": "
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 21 /**
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 22 * imr_self_test_result - Print result string for self test.
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 23 *
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 24 * @res: result code - true if test passed false otherwise.
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 25 * @fmt: format string.
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 26 * ... variadic argument list.
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 27 */
9120cf4fd9ae77 Nicolas Iooss 2016-12-19 28 static __printf(2, 3)
9120cf4fd9ae77 Nicolas Iooss 2016-12-19 29 void __init imr_self_test_result(int res, const char *fmt, ...)
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 @30 {
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 31 va_list vlist;
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 32
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 33 /* Print pass/fail. */
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 34 if (res)
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 35 pr_info(SELFTEST "pass ");
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 36 else
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 37 pr_info(SELFTEST "fail ");
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 38
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 39 /* Print variable string. */
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 40 va_start(vlist, fmt);
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 41 vprintk(fmt, vlist);
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 42 va_end(vlist);
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 43
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 44 /* Optional warning. */
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 45 WARN(res == 0, "test failed");
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 46 }
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 47 #undef SELFTEST
28a375df16c2b6 Bryan O'Donoghue 2015-01-30 48

:::::: The code at line 30 was first introduced by commit
:::::: 28a375df16c2b6d01227541f3956568995aa5fda x86/intel/quark: Add Isolated Memory Regions for Quark X1000

:::::: TO: Bryan O'Donoghue <pure.logic@xxxxxxxxxxxxxxxxx>
:::::: CC: Ingo Molnar <mingo@xxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki