From: Nick Desaulniers Date: Mon, 10 Jul 2017 22:47:26 +0000 (-0700) Subject: UPSTREAM: mm/zsmalloc.c: fix -Wunneeded-internal-declaration warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a342a2fd91f5f29539a2876d3333e3dcc27cffbe;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds (cherry picked from commit 3457f4147675108aa83f9f33c136f06bb9f8518f) Signed-off-by: Nathan Chancellor --- diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index a5ad4dab4ab8..8449637475b9 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -491,7 +491,7 @@ static bool is_zspage_isolated(struct zspage *zspage) return zspage->isolated; } -static int is_first_page(struct page *page) +static __maybe_unused int is_first_page(struct page *page) { return PagePrivate(page); }