Skip to contentSkip to conversation

suspend: fix section mismatch warning - register_nosave_region

PATCH In review Marcin Slusarz 3 participants 3 messages Aug 12, 2008 – Aug 13, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 suspend: fix section mismatch warning - register_nosave_region

WARNING: vmlinux.o(.text+0xe684): Section mismatch in reference from the function register_nosave_region() to the function .init.text:__register_nosave_region() The function register_nosave_region() references
the function __init __register_nosave_region().
This is often because register_nosave_region lacks a __init
annotation or the annotation of __register_nosave_region is wrong.

register_nosave_region calls __init function and is called only from __init functions

Cc Rafael J. Wysocki <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Len Brown <[email protected]>
---
 include/linux/suspend.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
include/linux/suspend.h +2 -2
index c634350..2ce8207 100644
@@ -217,11 +217,11 @@ struct platform_hibernation_ops {
 #ifdef CONFIG_HIBERNATION
 /* kernel/power/snapshot.c */
 extern void __register_nosave_region(unsigned long b, unsigned long e, int km);
-static inline void register_nosave_region(unsigned long b, unsigned long e)
+static inline void __init register_nosave_region(unsigned long b, unsigned long e)
 {
 	__register_nosave_region(b, e, 0);
 }
-static inline void register_nosave_region_late(unsigned long b, unsigned long e)
+static inline void __init register_nosave_region_late(unsigned long b, unsigned long e)
 {
 	__register_nosave_region(b, e, 1);
 }
Signature · 1 line
1.5.4.5
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Marcin Slusarz

WARNING: vmlinux.o(.text+0xe684): Section mismatch in reference from the function register_nosave_region() to the function .init.text:__register_nosave_region() The function register_nosave_region() references
the function __init __register_nosave_region().
This is often because register_nosave_region lacks a __init
annotation or the annotation of __register_nosave_region is wrong.

Quoted 6 lines

register_nosave_region calls __init function and is called only from __init functions

Cc Rafael J. Wysocki <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Len Brown <[email protected]>
Quoted 22 lines
---
 include/linux/suspend.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
include/linux/suspend.h +2 -2
index c634350..2ce8207 100644
@@ -217,11 +217,11 @@ struct platform_hibernation_ops {
 #ifdef CONFIG_HIBERNATION
 /* kernel/power/snapshot.c */
 extern void __register_nosave_region(unsigned long b, unsigned long e, int km);
-static inline void register_nosave_region(unsigned long b, unsigned long e)
+static inline void __init register_nosave_region(unsigned long b, unsigned long e)
 {
 	__register_nosave_region(b, e, 0);
 }
-static inline void register_nosave_region_late(unsigned long b, unsigned long e)
+static inline void __init register_nosave_region_late(unsigned long b, unsigned long e)
 {
 	__register_nosave_region(b, e, 1);
 }
Acked-by on v1 1/1
#2 lore raw
In reply to Marcin Slusarz
Quoted 10 lines · Marcin Slusarz

WARNING: vmlinux.o(.text+0xe684): Section mismatch in reference from the function register_nosave_region() to the function .init.text:__register_nosave_region() The function register_nosave_region() references
the function __init __register_nosave_region().
This is often because register_nosave_region lacks a __init
annotation or the annotation of __register_nosave_region is wrong.

register_nosave_region calls __init function and is called only from __init functions

Cc Rafael J. Wysocki <[email protected]>
Quoted 1 line
Cc Len Brown <[email protected]>

You probably want to send it to akpm and/or Andi Kleen: Len is on holidays.
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html