include/linux/kern_levels.h:5:25: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'unsigned int'

From: kernel test robot
Date: Sun Sep 24 2023 - 21:23:17 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6465e260f48790807eef06b583b38ca9789b6072
commit: 02a07872f84fc5fe61fa65310ff23bcad166a4f5 ASoC: dma-sh7760: cleanup a debug printk
date: 4 years, 9 months ago
config: sh-randconfig-r015-20221226 (https://download.01.org/0day-ci/archive/20230925/202309250903.XNAjFuxy-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230925/202309250903.XNAjFuxy-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/202309250903.XNAjFuxy-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

In file included from include/linux/kernel.h:14,
from include/linux/list.h:9,
from include/linux/module.h:9,
from sound/soc/sh/dma-sh7760.c:13:
sound/soc/sh/dma-sh7760.c: In function 'camelot_prepare':
>> include/linux/kern_levels.h:5:25: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'unsigned int' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/printk.h:136:24: note: in definition of macro 'no_printk'
136 | printk(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:346:19: note: in expansion of macro 'KERN_DEBUG'
346 | no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~
sound/soc/sh/dma-sh7760.c:205:9: note: in expansion of macro 'pr_debug'
205 | pr_debug("PCM data: addr 0x%08lx len %d\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
https://github.com/intel/lkp-tests/wiki