]> 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)
commitf13bde360266312b697e560b6b321350ef4502dd
tree82003b07c7968e2c2b5ce770a0cdd122aba9a8a2
parent9a38489a53aab11df115cf7f72043a08fff57a1d
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:   34f89749b934f18cca682fdf27d4c9645bdb180c
  commit: 8eed7be5ca0711ff1b11bb23e0a11348d6203d04 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 8eed7be5ca0711ff1b11bb23e0a11348d6203d04
    # 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