UPSTREAM: mm/zsmalloc.c: fix -Wunneeded-internal-declaration warning
authorNick Desaulniers <nick.desaulniers@gmail.com>
Mon, 10 Jul 2017 22:47:26 +0000 (15:47 -0700)
committerMichael Benedict <michaelbt@live.com>
Sat, 31 Aug 2019 15:08:51 +0000 (01:08 +1000)
commit7b516409e0ae1161b4db8e61bbaf610eaa87418d
treeb0c55e3ca5975ac4197e2812ccc51273fc9ac1ab
parentdd4bae3c13ee87e07dbe8b0388841304c1fed290
UPSTREAM: mm/zsmalloc.c: fix -Wunneeded-internal-declaration warning

is_first_page() is only called from the macro VM_BUG_ON_PAGE() which is
only compiled in as a runtime check when CONFIG_DEBUG_VM is set,
otherwise is checked at compile time and not actually compiled in.

Fixes the following warning, found with Clang:

  mm/zsmalloc.c:472:12: warning: function 'is_first_page' is not needed and will not be emitted [-Wunneeded-internal-declaration]
  static int is_first_page(struct page *page)
           ^

Link: http://lkml.kernel.org/r/20170524053859.29059-1-nick.desaulniers@gmail.com
Signed-off-by: Nick Desaulniers <nick.desaulniers@gmail.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 3457f4147675108aa83f9f33c136f06bb9f8518f)
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
mm/zsmalloc.c