kernel/power/: move function prototypes to header
Subsystems (2)
PATCH 1/1 kernel/power/: move function prototypes to header
This patch moves the prototypes of count_highmem_pages() and restore_highmem() to kernel/power/power.h
Signed-off-by Adrian Bunk <[email protected]>
---
kernel/power/power.h | 8 ++++++++ kernel/power/snapshot.c | 1 - kernel/power/swsusp.c | 8 -------- 3 files changed, 8 insertions(+), 9 deletions(-)
20af06052a0203d9e60b4937282793900c756182
kernel/power/power.h +8 -0
@@ -211,3 +211,11 @@ static inline int pm_notifier_call_chain(unsigned long val)return (blocking_notifier_call_chain (&pm_chain_head, val,NULL ) ==NOTIFY_BAD ) ? -EINVAL :0 ; } + +#ifdef CONFIG_HIGHMEM +unsigned int count_highmem_pages (void ); +int restore_highmem (void ); +#else +static inline unsigned int count_highmem_pages (void ) {return 0 ; } +static inline int restore_highmem (void ) {return 0 ; } +#endif
kernel/power/snapshot.c +0 -1
@@ -872,7 +872,6 @@ unsigned int count_highmem_pages(void) }#else static inline void *saveable_highmem_page (unsigned long pfn) {return NULL ; } -static inline unsigned int count_highmem_pages (void ) {return 0 ; }#endif /* CONFIG_HIGHMEM */ /**
kernel/power/swsusp.c +0 -8
@@ -64,14 +64,6 @@ unsigned long image_size = 500 * 1024 * 1024; int in_suspend __nosavedata = 0; -#ifdef CONFIG_HIGHMEM -unsigned int count_highmem_pages (void ); -int restore_highmem (void ); -#else -static inline int restore_highmem (void ) {return 0 ; } -static inline unsigned int count_highmem_pages (void ) {return 0 ; } -#endif -/** * The following functions are used for tracing the allocated * swap pages, so that they can be freed in case of an error.
Quoted 4 lines · Adrian Bunk
This patch moves the prototypes of
count_highmem_pages()andrestore_highmem()tokernel/power/power.hSigned-off-by Adrian Bunk <[email protected]>
Quoted 58 lines
---
kernel/power/power.h | 8 ++++++++ kernel/power/snapshot.c | 1 - kernel/power/swsusp.c | 8 -------- 3 files changed, 8 insertions(+), 9 deletions(-)
20af06052a0203d9e60b4937282793900c756182kernel/power/power.h +8
-0@@ -211,3 +211,11 @@ static inline int pm_notifier_call_chain(unsigned long val)return (blocking_notifier_call_chain (&pm_chain_head, val,NULL ) ==NOTIFY_BAD ) ? -EINVAL :0 ; } + +#ifdef CONFIG_HIGHMEM +unsigned int count_highmem_pages (void ); +int restore_highmem (void ); +#else +static inline unsigned int count_highmem_pages (void ) {return 0 ; } +static inline int restore_highmem (void ) {return 0 ; } +#endif kernel/power/snapshot.c +0
-1@@ -872,7 +872,6 @@ unsigned int count_highmem_pages(void) }#else static inline void *saveable_highmem_page (unsigned long pfn) {return NULL ; } -static inline unsigned int count_highmem_pages (void ) {return 0 ; }#endif /* CONFIG_HIGHMEM */ /** kernel/power/swsusp.c +0
-8@@ -64,14 +64,6 @@ unsigned long image_size = 500 * 1024 * 1024; int in_suspend __nosavedata = 0; -#ifdef CONFIG_HIGHMEM -unsigned int count_highmem_pages (void ); -int restore_highmem (void ); -#else -static inline int restore_highmem (void ) {return 0 ; } -static inline unsigned int count_highmem_pages (void ) {return 0 ; } -#endif -/** * The following functions are used for tracing the allocated * swap pages, so that they can be freed in case of an error.
Signature · 1 line
"Premature optimization is the root of all evil." - Donald Knuth
Quoted 4 lines · Adrian Bunk
This patch moves the prototypes of
count_highmem_pages()andrestore_highmem()tokernel/power/power.hSigned-off-by Adrian Bunk <[email protected]>
Quoted 58 lines
---
kernel/power/power.h | 8 ++++++++ kernel/power/snapshot.c | 1 - kernel/power/swsusp.c | 8 -------- 3 files changed, 8 insertions(+), 9 deletions(-)
20af06052a0203d9e60b4937282793900c756182kernel/power/power.h +8
-0@@ -211,3 +211,11 @@ static inline int pm_notifier_call_chain(unsigned long val)return (blocking_notifier_call_chain (&pm_chain_head, val,NULL ) ==NOTIFY_BAD ) ? -EINVAL :0 ; } + +#ifdef CONFIG_HIGHMEM +unsigned int count_highmem_pages (void ); +int restore_highmem (void ); +#else +static inline unsigned int count_highmem_pages (void ) {return 0 ; } +static inline int restore_highmem (void ) {return 0 ; } +#endif kernel/power/snapshot.c +0
-1@@ -872,7 +872,6 @@ unsigned int count_highmem_pages(void) }#else static inline void *saveable_highmem_page (unsigned long pfn) {return NULL ; } -static inline unsigned int count_highmem_pages (void ) {return 0 ; }#endif /* CONFIG_HIGHMEM */ /** kernel/power/swsusp.c +0
-8@@ -64,14 +64,6 @@ unsigned long image_size = 500 * 1024 * 1024; int in_suspend __nosavedata = 0; -#ifdef CONFIG_HIGHMEM -unsigned int count_highmem_pages (void ); -int restore_highmem (void ); -#else -static inline int restore_highmem (void ) {return 0 ; } -static inline unsigned int count_highmem_pages (void ) {return 0 ; } -#endif -/** * The following functions are used for tracing the allocated * swap pages, so that they can be freed in case of an error.
Signature · 1 line
"Premature optimization is the root of all evil." - Donald Knuth