[kevin78:percpu-cleanup 3/4] include/linux/kern_levels.h:5:25: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'long long unsigned int'

From: kernel test robot
Date: Mon Dec 13 2021 - 17:20:04 EST


tree: https://github.com/kevin78/linux.git percpu-cleanup
head: ec8bef0e65982bb71c931efddde0fca6418e02ba
commit: c3ebf9a83e686d6d3dc8b571493219a64558d536 [3/4] mm: percpu: Add generic pcpu_fc_alloc/free funciton
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20211214/202112140613.AxIBwwbd-lkp@xxxxxxxxx/config)
compiler: aarch64-linux-gcc (GCC) 11.2.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://github.com/kevin78/linux/commit/c3ebf9a83e686d6d3dc8b571493219a64558d536
git remote add kevin78 https://github.com/kevin78/linux.git
git fetch --no-tags kevin78 percpu-cleanup
git checkout c3ebf9a83e686d6d3dc8b571493219a64558d536
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

In file included from include/linux/kernel.h:20,
from include/linux/cpumask.h:10,
from mm/percpu.c:72:
mm/percpu.c: In function 'pcpu_fc_alloc':
>> include/linux/kern_levels.h:5:25: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'long long unsigned int' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/printk.h:422:25: note: in definition of macro 'printk_index_wrap'
422 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
include/linux/printk.h:132:17: note: in expansion of macro 'printk'
132 | printk(fmt, ##__VA_ARGS__); \
| ^~~~~~
include/linux/printk.h:580:9: note: in expansion of macro 'no_printk'
580 | no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~
include/linux/kern_levels.h:15:25: note: in expansion of macro 'KERN_SOH'
15 | #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
| ^~~~~~~~
include/linux/printk.h:580:19: note: in expansion of macro 'KERN_DEBUG'
580 | no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~
mm/percpu.c:3011:17: note: in expansion of macro 'pr_debug'
3011 | pr_debug("per cpu data for cpu%d %lu bytes at %016lx\n",
| ^~~~~~~~
include/linux/kern_levels.h:5:25: warning: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'long long unsigned int' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/printk.h:422:25: note: in definition of macro 'printk_index_wrap'
422 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
include/linux/printk.h:132:17: note: in expansion of macro 'printk'
132 | printk(fmt, ##__VA_ARGS__); \
| ^~~~~~
include/linux/printk.h:580:9: note: in expansion of macro 'no_printk'
580 | no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~
include/linux/kern_levels.h:15:25: note: in expansion of macro 'KERN_SOH'
15 | #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
| ^~~~~~~~
include/linux/printk.h:580:19: note: in expansion of macro 'KERN_DEBUG'
580 | no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~
mm/percpu.c:3018:17: note: in expansion of macro 'pr_debug'
3018 | pr_debug("per cpu data for cpu%d %lu bytes on node%d at %016lx\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