]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/base/memory.c: Remove unused 'first_page' variable
authorKirtika Ruchandani <kirtika@chromium.org>
Fri, 25 Nov 2016 01:12:00 +0000 (17:12 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Nov 2016 19:58:31 +0000 (20:58 +0100)
commitf592b8fd1db5a502088625ba5b284d28e97cb874
tree259d8a80c373e8cf2ba18189e8c337a013e59e91
parentd7fa0a9aaa57fdebbc5a0992f5f6e63d9f64108d
drivers/base/memory.c: Remove unused 'first_page' variable

Commit edbd15573f8f ("memory-hotplug: remove redundant call of page_to_pfn")
introduced an optimization that rendered 'struct page* first_page'
useless in memory_block_action(). Compiling with W=1 gives the
following warning, fix it.

drivers/base/memory.c: In function ‘memory_block_action’:
drivers/base/memory.c:229:15: warning: variable ‘first_page’ set but not used [-Wunused-but-set-variable]
  struct page *first_page;
               ^

This is a harmeless warning and is only being fixed to reduce the
noise with W=1 in the kernel. The call to pfn_to_page() has no side
effects and is safe to remove.

Fixes: edbd15573f8f ("memory-hotplug: remove redundant call of page_to_pfn")
Cc: Zhang Zhen <zhenzhang.zhang@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/memory.c