mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] suspend: fix section mismatch warning - register_nosave_region
@ 2008-08-12 21:23 Marcin Slusarz
  2008-08-12 21:49 ` Rafael J. Wysocki
  2008-08-13  6:55 ` Pavel Machek
  0 siblings, 2 replies; 3+ messages in thread
From: Marcin Slusarz @ 2008-08-12 21:23 UTC (permalink / raw)
  To: LKML; +Cc: Rafael J. Wysocki, Pavel Machek, Len Brown

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 <marcin.slusarz@gmail.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Pavel Machek <pavel@suse.cz>
Cc: Len Brown <len.brown@intel.com>
---
 include/linux/suspend.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index c634350..2ce8207 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);
 }
-- 
1.5.4.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] suspend: fix section mismatch warning - register_nosave_region
  2008-08-12 21:23 [PATCH] suspend: fix section mismatch warning - register_nosave_region Marcin Slusarz
@ 2008-08-12 21:49 ` Rafael J. Wysocki
  2008-08-13  6:55 ` Pavel Machek
  1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2008-08-12 21:49 UTC (permalink / raw)
  To: Marcin Slusarz; +Cc: LKML, Pavel Machek, Len Brown, Andrew Morton

On Tuesday, 12 of August 2008, Marcin Slusarz wrote:
> 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 <marcin.slusarz@gmail.com>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Cc: Pavel Machek <pavel@suse.cz>
> Cc: Len Brown <len.brown@intel.com>

Acked-by: Rafael J. Wysocki <rjw@sisk.pl>

> ---
>  include/linux/suspend.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/suspend.h b/include/linux/suspend.h
> index c634350..2ce8207 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);
>  }



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] suspend: fix section mismatch warning - register_nosave_region
  2008-08-12 21:23 [PATCH] suspend: fix section mismatch warning - register_nosave_region Marcin Slusarz
  2008-08-12 21:49 ` Rafael J. Wysocki
@ 2008-08-13  6:55 ` Pavel Machek
  1 sibling, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2008-08-13  6:55 UTC (permalink / raw)
  To: Marcin Slusarz; +Cc: LKML, Rafael J. Wysocki, Len Brown

On Tue 2008-08-12 23:23:06, Marcin Slusarz wrote:
> 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 <marcin.slusarz@gmail.com>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>

Acked-by: Pavel Machek <pavel@suse.cz>
> Cc: Len Brown <len.brown@intel.com>

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

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-13  7:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-12 21:23 [PATCH] suspend: fix section mismatch warning - register_nosave_region Marcin Slusarz
2008-08-12 21:49 ` Rafael J. Wysocki
2008-08-13  6:55 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®