[PATCH v3] memory-hotplug: Fix kernel warning during memory hotplug on ppc64

kbuild test robot lkp at intel.com
Thu Jan 7 08:49:04 AEDT 2016


Hi John,

[auto build test WARNING on v4.4-rc8]
[also build test WARNING on next-20160106]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/John-Allen/memory-hotplug-Fix-kernel-warning-during-memory-hotplug-on-ppc64/20160107-053749
config: x86_64-randconfig-x017-01041832 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/base/memory.c: In function 'memory_probe_store':
>> drivers/base/memory.c:454:6: warning: unused variable 'i' [-Wunused-variable]
     int i, ret;
         ^

vim +/i +454 drivers/base/memory.c

3947be19 Dave Hansen     2005-10-29  438  
10fbcf4c Kay Sievers     2011-12-21  439  static DEVICE_ATTR(block_size_bytes, 0444, print_block_size, NULL);
3947be19 Dave Hansen     2005-10-29  440  
3947be19 Dave Hansen     2005-10-29  441  /*
3947be19 Dave Hansen     2005-10-29  442   * Some architectures will have custom drivers to do this, and
3947be19 Dave Hansen     2005-10-29  443   * will not need to do it from userspace.  The fake hot-add code
3947be19 Dave Hansen     2005-10-29  444   * as well as ppc64 will do all of their discovery in userspace
3947be19 Dave Hansen     2005-10-29  445   * and will require this interface.
3947be19 Dave Hansen     2005-10-29  446   */
3947be19 Dave Hansen     2005-10-29  447  #ifdef CONFIG_ARCH_MEMORY_PROBE
3947be19 Dave Hansen     2005-10-29  448  static ssize_t
10fbcf4c Kay Sievers     2011-12-21  449  memory_probe_store(struct device *dev, struct device_attribute *attr,
28812fe1 Andi Kleen      2010-01-05  450  		   const char *buf, size_t count)
3947be19 Dave Hansen     2005-10-29  451  {
3947be19 Dave Hansen     2005-10-29  452  	u64 phys_addr;
bc02af93 Yasunori Goto   2006-06-27  453  	int nid;
6add7cd6 Nathan Fontenot 2011-01-31 @454  	int i, ret;
61b94fea Anton Blanchard 2011-09-15  455  	unsigned long pages_per_block = PAGES_PER_SECTION * sections_per_block;
3947be19 Dave Hansen     2005-10-29  456  
b69deb2b Zhang Zhen      2014-08-06  457  	ret = kstrtoull(buf, 0, &phys_addr);
b69deb2b Zhang Zhen      2014-08-06  458  	if (ret)
b69deb2b Zhang Zhen      2014-08-06  459  		return ret;
3947be19 Dave Hansen     2005-10-29  460  
61b94fea Anton Blanchard 2011-09-15  461  	if (phys_addr & ((pages_per_block << PAGE_SHIFT) - 1))
61b94fea Anton Blanchard 2011-09-15  462  		return -EINVAL;

:::::: The code at line 454 was first introduced by commit
:::::: 6add7cd618b4d4dc525731beb539c5e06e891855 memory hotplug: sysfs probe routine should add all memory sections

:::::: TO: Nathan Fontenot <nfont at austin.ibm.com>
:::::: CC: Greg Kroah-Hartman <gregkh at suse.de>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/octet-stream
Size: 22761 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20160107/e5b5c882/attachment-0001.obj>


More information about the Linuxppc-dev mailing list