[linux-next:master 3540/5542] drivers/base/arch_numa.c:361:15: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int')

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Atish,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   226871e2eda4832d94c3239add7e52ad17b81ce5
commit: 4f0e8eef772ee4438f304b2178bc28c958b6c13d [3540/5542] riscv: Add numa support for riscv64 platform
config: riscv-randconfig-r024-20210125 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 12d0753aca22896fda2cf76781b0ee0524d55065)
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
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=4f0e8eef772ee4438f304b2178bc28c958b6c13d
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 4f0e8eef772ee4438f304b2178bc28c958b6c13d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 

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

All warnings (new ones prefixed by >>):

>> drivers/base/arch_numa.c:361:15: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat]
                                   mblk_nid, mblk->base,
                                             ^~~~~~~~~~
   include/linux/printk.h:353:37: note: expanded from macro 'pr_warn'
           printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
                                      ~~~     ^~~~~~~~~~~
>> drivers/base/arch_numa.c:362:5: warning: format specifies type 'unsigned long long' but the argument has type 'unsigned int' [-Wformat]
                                   mblk->base + mblk->size - 1);
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/printk.h:353:37: note: expanded from macro 'pr_warn'
           printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
                                      ~~~     ^~~~~~~~~~~
   drivers/base/arch_numa.c:435:54: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat]
           pr_info("Faking a node at [mem %#018Lx-%#018Lx]\n", start, end - 1);
                                          ~~~~~~~              ^~~~~
                                          %#018x
   include/linux/printk.h:373:34: note: expanded from macro 'pr_info'
           printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
                                   ~~~     ^~~~~~~~~~~
   drivers/base/arch_numa.c:435:61: warning: format specifies type 'unsigned long long' but the argument has type 'unsigned int' [-Wformat]
           pr_info("Faking a node at [mem %#018Lx-%#018Lx]\n", start, end - 1);
                                                  ~~~~~~~             ^~~~~~~
                                                  %#018x
   include/linux/printk.h:373:34: note: expanded from macro 'pr_info'
           printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
                                   ~~~     ^~~~~~~~~~~
   4 warnings generated.


vim +361 drivers/base/arch_numa.c

1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  349  
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  350  static int __init numa_register_nodes(void)
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  351  {
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  352  	int nid;
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  353  	struct memblock_region *mblk;
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  354  
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  355  	/* Check that valid nid is set to memblks */
cc6de1680538633 arch/arm64/mm/numa.c Mike Rapoport       2020-10-13  356  	for_each_mem_region(mblk) {
d622abf74f3d813 arch/arm64/mm/numa.c Mike Rapoport       2020-06-03  357  		int mblk_nid = memblock_get_region_node(mblk);
d622abf74f3d813 arch/arm64/mm/numa.c Mike Rapoport       2020-06-03  358  
d622abf74f3d813 arch/arm64/mm/numa.c Mike Rapoport       2020-06-03  359  		if (mblk_nid == NUMA_NO_NODE || mblk_nid >= MAX_NUMNODES) {
f11c7bacd5941fc arch/arm64/mm/numa.c Kefeng Wang         2016-09-01  360  			pr_warn("Warning: invalid memblk node %d [mem %#010Lx-%#010Lx]\n",
d622abf74f3d813 arch/arm64/mm/numa.c Mike Rapoport       2020-06-03 @361  				mblk_nid, mblk->base,
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08 @362  				mblk->base + mblk->size - 1);
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  363  			return -EINVAL;
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  364  		}
d622abf74f3d813 arch/arm64/mm/numa.c Mike Rapoport       2020-06-03  365  	}
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  366  
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  367  	/* Finally register nodes. */
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  368  	for_each_node_mask(nid, numa_nodes_parsed) {
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  369  		unsigned long start_pfn, end_pfn;
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  370  
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  371  		get_pfn_range_for_nid(nid, &start_pfn, &end_pfn);
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  372  		setup_node_data(nid, start_pfn, end_pfn);
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  373  		node_set_online(nid);
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  374  	}
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  375  
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  376  	/* Setup online nodes to actual nodes*/
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  377  	node_possible_map = numa_nodes_parsed;
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  378  
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  379  	return 0;
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  380  }
1a2db300348b799 arch/arm64/mm/numa.c Ganapatrao Kulkarni 2016-04-08  381  

:::::: The code at line 361 was first introduced by commit
:::::: d622abf74f3d81365e41c3bfdbbda50ecd99ba3d mm: memblock: replace dereferences of memblock_region.nid with API calls

:::::: TO: Mike Rapoport <rppt@xxxxxxxxxxxxx>
:::::: 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


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux