[PATCH v1] pseries/hotplug-memory: hot-add: skip redundant LMB lookup

kernel test robot lkp at intel.com
Fri Sep 11 15:18:42 AEST 2020


Hi Scott,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on powerpc/next]
[also build test WARNING on next-20200910]
[cannot apply to v5.9-rc4]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Scott-Cheloha/pseries-hotplug-memory-hot-add-skip-redundant-LMB-lookup/20200911-015744
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-randconfig-r034-20200911 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 0448d11a06b451a63a8f60408fec613ad24801ba)
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 powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc 

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 >>):

>> arch/powerpc/mm/numa.c:433:5: warning: no previous prototype for function 'of_drconf_to_nid_single' [-Wmissing-prototypes]
   int of_drconf_to_nid_single(struct drmem_lmb *lmb)
       ^
   arch/powerpc/mm/numa.c:433:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int of_drconf_to_nid_single(struct drmem_lmb *lmb)
   ^
   static 
   1 warning generated.

# https://github.com/0day-ci/linux/commit/e6847f3f58460841a28885578cc3547735cfa50c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Scott-Cheloha/pseries-hotplug-memory-hot-add-skip-redundant-LMB-lookup/20200911-015744
git checkout e6847f3f58460841a28885578cc3547735cfa50c
vim +/of_drconf_to_nid_single +433 arch/powerpc/mm/numa.c

   428	
   429	/*
   430	 * This is like of_node_to_nid_single() for memory represented in the
   431	 * ibm,dynamic-reconfiguration-memory node.
   432	 */
 > 433	int of_drconf_to_nid_single(struct drmem_lmb *lmb)
   434	{
   435		struct assoc_arrays aa = { .arrays = NULL };
   436		int default_nid = NUMA_NO_NODE;
   437		int nid = default_nid;
   438		int rc, index;
   439	
   440		if ((min_common_depth < 0) || !numa_enabled)
   441			return default_nid;
   442	
   443		rc = of_get_assoc_arrays(&aa);
   444		if (rc)
   445			return default_nid;
   446	
   447		if (min_common_depth <= aa.array_sz &&
   448		    !(lmb->flags & DRCONF_MEM_AI_INVALID) && lmb->aa_index < aa.n_arrays) {
   449			index = lmb->aa_index * aa.array_sz + min_common_depth - 1;
   450			nid = of_read_number(&aa.arrays[index], 1);
   451	
   452			if (nid == 0xffff || nid >= nr_node_ids)
   453				nid = default_nid;
   454	
   455			if (nid > 0) {
   456				index = lmb->aa_index * aa.array_sz;
   457				initialize_distance_lookup_table(nid,
   458								&aa.arrays[index]);
   459			}
   460		}
   461	
   462		return nid;
   463	}
   464	

---
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: 34599 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20200911/40d9c39e/attachment-0001.gz>


More information about the Linuxppc-dev mailing list