[arm-platforms:hack/m1-pcie 15/15] include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'}

kernel test robot lkp at intel.com
Sat Apr 3 19:08:33 BST 2021


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git hack/m1-pcie
head:   1fd2c9634dd24fba323baba52200de18e4d3f4ee
commit: 1fd2c9634dd24fba323baba52200de18e4d3f4ee [15/15] WIP
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.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/maz/arm-platforms.git/commit/?id=1fd2c9634dd24fba323baba52200de18e4d3f4ee
        git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
        git fetch --no-tags arm-platforms hack/m1-pcie
        git checkout 1fd2c9634dd24fba323baba52200de18e4d3f4ee
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:7,
                    from include/linux/kernel.h:16,
                    from include/linux/clk.h:13,
                    from drivers/iommu/apple-dart-iommu.c:12:
   drivers/iommu/apple-dart-iommu.c: In function 'apple_dart_map':
>> include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
       5 | #define KERN_SOH "\001"  /* ASCII Start Of Header */
         |                  ^~~~~~
   include/linux/kern_levels.h:12:22: note: in expansion of macro 'KERN_SOH'
      12 | #define KERN_WARNING KERN_SOH "4" /* warning conditions */
         |                      ^~~~~~~~
   include/linux/printk.h:353:9: note: in expansion of macro 'KERN_WARNING'
     353 |  printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/iommu/apple-dart-iommu.c:360:2: note: in expansion of macro 'pr_warn'
     360 |  pr_warn("mapping %lx %llx %lx\n", iova, paddr, size);
         |  ^~~~~~~
   drivers/iommu/apple-dart-iommu.c:360:30: note: format string is defined here
     360 |  pr_warn("mapping %lx %llx %lx\n", iova, paddr, size);
         |                            ~~^
         |                              |
         |                              long unsigned int
         |                            %x


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 at perches.com>
:::::: CC: Linus Torvalds <torvalds at linux-foundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 67447 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210404/8ea28b0f/attachment-0001.gz>


More information about the linux-arm-kernel mailing list