The declaration for pfn_is_nosave is only available in kernel/power/power.h. Since this function can be override in arch, expose it globally. Having a prototype will make sure to avoid warning (sometime treated as error with W=1) such as: arch/powerpc/kernel/suspend.c:18:5: error: no previous prototype for 'pfn_is_nosave' [-Werror=missing-prototypes] This moves the declaration into a globally visible header file and add missing include to avoid a warning on powerpc. Also remove the duplicated prototypes since not required anymore.
Showing the changes to include/linux (1 of 4 files). Show all
Unified · Split
| @@ -426,6 +426,7 @@ extern bool system_entering_hibernation(void); · 425 unmodified lines | ||
| 426 | 426 | extern bool hibernation_available(void); |
| 427 | 427 | asmlinkage int swsusp_save(void); |
| 428 | 428 | extern struct pbe *restore_pblist; |
| 429 | +int pfn_is_nosave(unsigned long pfn); | |
| 429 | 430 | #else /* CONFIG_HIBERNATION */ |
| 430 | 431 | static inline void register_nosave_region(unsigned long b, unsigned long e) {} |
| 431 | 432 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) {} |