[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170524053859.29059-1-nick.desaulniers@gmail.com>
Date: Tue, 23 May 2017 22:38:57 -0700
From: Nick Desaulniers <nick.desaulniers@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: md@...gle.com, mka@...omium.org,
Nick Desaulniers <nick.desaulniers@...il.com>,
Minchan Kim <minchan@...nel.org>,
Nitin Gupta <ngupta@...are.org>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: [PATCH] mm/zsmalloc: 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 <nick.desaulniers@...il.com>
---
mm/zsmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index d41edd28298b..15959d35fc26 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -469,7 +469,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);
}
--
2.11.0
Powered by blists - more mailing lists