[arm-integrator:kernel-in-vmalloc-v5.14-rc1 9/9] include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'char *'

From: kernel test robot
Date: Fri Aug 06 2021 - 23:10:06 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git kernel-in-vmalloc-v5.14-rc1
head: 7c9dd64f2a22ee380da41e511593de3bc5c67f30
commit: 7c9dd64f2a22ee380da41e511593de3bc5c67f30 [9/9] compile fix
config: arm-am200epdkit_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git/commit/?id=7c9dd64f2a22ee380da41e511593de3bc5c67f30
git remote add arm-integrator https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
git fetch --no-tags arm-integrator kernel-in-vmalloc-v5.14-rc1
git checkout 7c9dd64f2a22ee380da41e511593de3bc5c67f30
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=arm

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

arch/arm/mm/init.c:97:13: warning: no previous prototype for 'setup_dma_zone' [-Wmissing-prototypes]
97 | void __init setup_dma_zone(const struct machine_desc *mdesc)
| ^~~~~~~~~~~~~~
arch/arm/mm/init.c:318:13: warning: no previous prototype for 'mem_init_print_arm_info' [-Wmissing-prototypes]
318 | void __init mem_init_print_arm_info(void)
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/printk.h:7,
from include/linux/kernel.h:19,
from arch/arm/mm/init.c:7:
arch/arm/mm/init.c: In function 'mem_init_print_arm_info':
>> include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'char *' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:13:21: note: in expansion of macro 'KERN_SOH'
13 | #define KERN_NOTICE KERN_SOH "5" /* normal but significant condition */
| ^~~~~~~~
include/linux/printk.h:410:9: note: in expansion of macro 'KERN_NOTICE'
410 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~
arch/arm/mm/init.c:321:2: note: in expansion of macro 'pr_notice'
321 | pr_notice("Virtual kernel memory layout:\n"
| ^~~~~~~~~
>> include/linux/kern_levels.h:5:18: warning: too many arguments for format [-Wformat-extra-args]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:13:21: note: in expansion of macro 'KERN_SOH'
13 | #define KERN_NOTICE KERN_SOH "5" /* normal but significant condition */
| ^~~~~~~~
include/linux/printk.h:410:9: note: in expansion of macro 'KERN_NOTICE'
410 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~
arch/arm/mm/init.c:321:2: note: in expansion of macro 'pr_notice'
321 | pr_notice("Virtual kernel memory layout:\n"
| ^~~~~~~~~


vim +5 include/linux/kern_levels.h

314ba3520e513a Joe Perches 2012-07-30 4
04d2c8c83d0e3a Joe Perches 2012-07-30 @5 #define KERN_SOH "\001" /* ASCII Start Of Header */
04d2c8c83d0e3a Joe Perches 2012-07-30 6 #define KERN_SOH_ASCII '\001'
04d2c8c83d0e3a Joe Perches 2012-07-30 7

:::::: The code at line 5 was first introduced by commit
:::::: 04d2c8c83d0e3ac5f78aeede51babb3236200112 printk: convert the format for KERN_<LEVEL> to a 2 byte pattern

:::::: TO: Joe Perches <joe@xxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip