]> git.baikalelectronics.ru Git - kernel.git/commit
mm, meminit: suppress unused memory variable warning
authorMel Gorman <mgorman@suse.de>
Fri, 17 Jul 2015 23:23:48 +0000 (16:23 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 17 Jul 2015 23:39:53 +0000 (16:39 -0700)
commit810c11d172546d9e55fa14e18eba02812a7c434a
tree82003b07c7968e2c2b5ce770a0cdd122aba9a8a2
parent69a3b66e61ca1fd5cdf8a38b2801ca389d14253e
mm, meminit: suppress unused memory variable warning

The kbuild test robot reported the following

  tree:   git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
  head:   c21fac25c2db091b1ba758a79a93879f665ecd03
  commit: fe96bf5fe28a06a7ba0ff7a917181ec478b42740 x86: mm: enable deferred struct page initialisation on x86-64
  date:   3 days ago
  config: x86_64-randconfig-x006-201527 (attached as .config)
  reproduce:
    git checkout fe96bf5fe28a06a7ba0ff7a917181ec478b42740
    # save the attached .config to linux build tree
    make ARCH=x86_64

  All warnings (new ones prefixed by >>):

     mm/page_alloc.c: In function 'early_page_uninitialised':
  >> mm/page_alloc.c:247:6: warning: unused variable 'nid' [-Wunused-variable]
       int nid = early_pfn_to_nid(pfn);

It's due to the NODE_DATA macro ignoring the nid parameter on !NUMA
configurations.  This patch avoids the warning by not declaring nid.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Reported-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c