mm/zsmalloc.c: fix -Wunneeded-internal-declaration warning
Subsystems (2)
[email protected]
maintainerPATCH 6/115 mm/zsmalloc.c: fix -Wunneeded-internal-declaration warning
From: Nick Desaulniers <[email protected]>
Subject: 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)
^
Signed-off-by Nick Desaulniers <[email protected]>
Reviewed-by Sergey Senozhatsky <[email protected]>
Acked-by Minchan Kim <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
mm/zsmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/zsmalloc.c renamed from mm/zsmalloc.c~mm-zsmalloc-fix-wunneeded-internal-declaration-warning +1 -1
@@ -469,7 +469,7 @@ static bool is_zspage_isolated(struct zsreturn zspage->isolated; } -static int is_first_page (struct page *page) +static __maybe_unused int is_first_page (struct page *page) {return PagePrivate (page); }
_