From: Marcin Slusarz Date: Fri, 15 Aug 2008 07:40:19 +0000 (-0700) Subject: suspend: fix section mismatch warning - register_nosave_region X-Git-Tag: v2.6.27-rc4~98 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce289e89726948b50a58c9e8f4e81174a8c9c254;p=linux-2.6 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 Signed-off-by: Marcin Slusarz Acked-by: Rafael J. Wysocki Cc: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/suspend.h b/include/linux/suspend.h index c634350959..2ce8207686 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -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); }