[lkml]   [2019]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 4.9 57/63] mm/zsmalloc.c: fix -Wunneeded-internal-declaration warning
4.9-stable review patch.  If anyone has any objections, please let me know.


From: Nick Desaulniers <>

commit 3457f4147675108aa83f9f33c136f06bb9f8518f upstream.

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 <>
Reviewed-by: Sergey Senozhatsky <>
Acked-by: Minchan Kim <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
Signed-off-by: Nathan Chancellor <>
Signed-off-by: Greg Kroah-Hartman <>
mm/zsmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -473,7 +473,7 @@ static bool is_zspage_isolated(struct zs
return zspage->isolated;

-static int is_first_page(struct page *page)
+static __maybe_unused int is_first_page(struct page *page)
return PagePrivate(page);

 \ /
  Last update: 2019-02-25 22:16    [W:0.223 / U:4.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site