linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Zhang Zhen <zhenzhang.zhang@huawei.com>
Cc: Linux Memory Management List <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	kbuild-all@01.org
Subject: [mmotm:master 80/287] drivers/base/memory.c:384:22: warning: unused variable 'zone_prev'
Date: Sat, 30 Aug 2014 07:36:27 +0800	[thread overview]
Message-ID: <54010e7b.VVb7MGzPloRFEoMb%fengguang.wu@intel.com> (raw)

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@huawei.com>
:::::: CC: Johannes Weiner <hannes@cmpxchg.org>

---
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@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

                 reply	other threads:[~2014-08-29 23:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54010e7b.VVb7MGzPloRFEoMb%fengguang.wu@intel.com \
    --to=fengguang.wu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=kbuild-all@01.org \
    --cc=linux-mm@kvack.org \
    --cc=zhenzhang.zhang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox