mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 1/1] PM: hibernate: Remove unused stub for saveable_highmem_page()
@ 2024-09-05 18:48 Andy Shevchenko
  2024-09-10 18:17 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2024-09-05 18:48 UTC (permalink / raw)
  To: Rafael J. Wysocki, linux-pm, linux-kernel, llvm
  Cc: Rafael J. Wysocki, Len Brown, Pavel Machek, Nathan Chancellor,
	Nick Desaulniers, Bill Wendling, Justin Stitt, Andy Shevchenko

When saveable_highmem_page() is unused, it prevents kernel builds
with clang, `make W=1` and CONFIG_WERROR=y:

kernel/power/snapshot.c:1369:21: error: unused function 'saveable_highmem_page' [-Werror,-Wunused-function]
 1369 | static inline void *saveable_highmem_page(struct zone *z, unsigned long p)
      |                     ^~~~~~~~~~~~~~~~~~~~~

Fix this by removing unused stub.

See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static
inline functions for W=1 build").

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 kernel/power/snapshot.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index 405eddbda4fc..30894d8f0a78 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -1365,11 +1365,6 @@ static unsigned int count_highmem_pages(void)
 	}
 	return n;
 }
-#else
-static inline void *saveable_highmem_page(struct zone *z, unsigned long p)
-{
-	return NULL;
-}
 #endif /* CONFIG_HIGHMEM */
 
 /**
-- 
2.43.0.rc1.1336.g36b5255a03ac


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-09-10 18:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-05 18:48 [PATCH v1 1/1] PM: hibernate: Remove unused stub for saveable_highmem_page() Andy Shevchenko
2024-09-10 18:17 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®