[mmotm:master 80/287] drivers/base/memory.c:384:22: warning: unused variable 'zone_prev'

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

 



tree:   git://git.cmpxchg.org/linux-mmotm.git master
head:   8f1fc64dc9b39fedb7390e086001ce5ec327e80d
commit: 0bba74d83e98573d20b6039aad5f7fdf08a7618a [80/287] memory-hotplug: fix not enough check of valid zones
config: make ARCH=x86_64 allmodconfig

All warnings:

   drivers/base/memory.c: In function 'show_zones_online_to':
>> drivers/base/memory.c:384:22: warning: unused variable 'zone_prev' [-Wunused-variable]
     struct zone *zone, *zone_prev;
                         ^

vim +/zone_prev +384 drivers/base/memory.c

3947be19 Dave Hansen   2005-10-29  368   */
10fbcf4c Kay Sievers   2011-12-21  369  static ssize_t show_phys_device(struct device *dev,
10fbcf4c Kay Sievers   2011-12-21  370  				struct device_attribute *attr, char *buf)
3947be19 Dave Hansen   2005-10-29  371  {
7315f0cc Gu Zheng      2013-08-28  372  	struct memory_block *mem = to_memory_block(dev);
3947be19 Dave Hansen   2005-10-29  373  	return sprintf(buf, "%d\n", mem->phys_device);
3947be19 Dave Hansen   2005-10-29  374  }
3947be19 Dave Hansen   2005-10-29  375  
2a71168c Andrew Morton 2014-08-29  376  #ifdef CONFIG_MEMORY_HOTREMOVE
473972f2 Zhang Zhen    2014-08-29  377  static ssize_t show_zones_online_to(struct device *dev,
473972f2 Zhang Zhen    2014-08-29  378  				struct device_attribute *attr, char *buf)
473972f2 Zhang Zhen    2014-08-29  379  {
473972f2 Zhang Zhen    2014-08-29  380  	struct memory_block *mem = to_memory_block(dev);
473972f2 Zhang Zhen    2014-08-29  381  	unsigned long start_pfn, end_pfn;
473972f2 Zhang Zhen    2014-08-29  382  	unsigned long nr_pages = PAGES_PER_SECTION * sections_per_block;
473972f2 Zhang Zhen    2014-08-29  383  	struct page *first_page;
473972f2 Zhang Zhen    2014-08-29 @384  	struct zone *zone, *zone_prev;
473972f2 Zhang Zhen    2014-08-29  385  
473972f2 Zhang Zhen    2014-08-29  386  	start_pfn = section_nr_to_pfn(mem->start_section_nr);
473972f2 Zhang Zhen    2014-08-29  387  	end_pfn = start_pfn + nr_pages;
473972f2 Zhang Zhen    2014-08-29  388  	first_page = pfn_to_page(start_pfn);
473972f2 Zhang Zhen    2014-08-29  389  
473972f2 Zhang Zhen    2014-08-29  390  	/* The block contains more than one zone can not be offlined. */
473972f2 Zhang Zhen    2014-08-29  391  	if (!test_pages_in_a_zone(start_pfn, end_pfn))
473972f2 Zhang Zhen    2014-08-29  392  		return sprintf(buf, "none\n");

:::::: The code at line 384 was first introduced by commit
:::::: 473972f2929d9640156f9e000a204a8ece7ecd61 memory-hotplug: add sysfs valid_zones attribute

:::::: TO: Zhang Zhen <zhenzhang.zhang@xxxxxxxxxx>
:::::: CC: Johannes Weiner <hannes@xxxxxxxxxxx>

---
0-DAY kernel build testing backend              Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild                 Intel Corporation

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




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