PM: hibernate: Remove unused stub for saveable_highmem_page()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 5 Sep 2024 18:48:48 +0000 (21:48 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 10 Sep 2024 18:11:40 +0000 (20:11 +0200)
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>
Link: https://patch.msgid.link/20240905184848.318978-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/power/snapshot.c

index 405eddbda4fc5728752ea580cabff4d71a2563e5..30894d8f0a781c349f3a359bd2f4745079c4b4fd 100644 (file)
@@ -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 */
 
 /**