public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] omap2+: pm: Fix section mismatch in pm_dbg_init()
@ 2011-06-16 20:31 Sanjeev Premi
  2011-06-20 21:09 ` Kevin Hilman
  0 siblings, 1 reply; 4+ messages in thread
From: Sanjeev Premi @ 2011-06-16 20:31 UTC (permalink / raw)
  To: linux-arm-kernel

Fix the section mismatch warning:

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

Signed-off-by: Sanjeev Premi <premi@ti.com>
---
 Applies to current linux-omap master

 arch/arm/mach-omap2/pm-debug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index e01da45..ef33273 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -595,7 +595,7 @@ static int option_set(void *data, u64 val)
 
 DEFINE_SIMPLE_ATTRIBUTE(pm_dbg_option_fops, option_get, option_set, "%llu\n");
 
-static int pm_dbg_init(void)
+static int __init pm_dbg_init(void)
 {
 	int i;
 	struct dentry *d;
-- 
1.7.2.2

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

* [PATCH] omap2+: pm: Fix section mismatch in pm_dbg_init()
  2011-06-16 20:31 [PATCH] omap2+: pm: Fix section mismatch in pm_dbg_init() Sanjeev Premi
@ 2011-06-20 21:09 ` Kevin Hilman
  2011-06-20 21:16   ` Russell King - ARM Linux
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Hilman @ 2011-06-20 21:09 UTC (permalink / raw)
  To: linux-arm-kernel

Sanjeev Premi <premi@ti.com> writes:

> Fix the section mismatch warning:
>
>   WARNING: vmlinux.o(.text+0x21118): Section mismatch
>   in reference from the function pm_dbg_init() to the
>   function .init.text:pwrdms_setup()
>   The function pm_dbg_init() references
>   the function __init pwrdms_setup().
>   This is often because pm_dbg_init lacks a __init
>   annotation or the annotation of pwrdms_setup is wrong.
>
> Signed-off-by: Sanjeev Premi <premi@ti.com>
> ---
>  Applies to current linux-omap master

A previous commit just removed the __init annotation here because of a
different conflict with the regset init.   The regset code is now
removed in my queue for 3.1, so this patch is fine on top of that
series.

Queueing for v3.1 (branch: for_3.1/pm-misc)

Thanks,

Kevin



>
>  arch/arm/mach-omap2/pm-debug.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
> index e01da45..ef33273 100644
> --- a/arch/arm/mach-omap2/pm-debug.c
> +++ b/arch/arm/mach-omap2/pm-debug.c
> @@ -595,7 +595,7 @@ static int option_set(void *data, u64 val)
>  
>  DEFINE_SIMPLE_ATTRIBUTE(pm_dbg_option_fops, option_get, option_set, "%llu\n");
>  
> -static int pm_dbg_init(void)
> +static int __init pm_dbg_init(void)
>  {
>  	int i;
>  	struct dentry *d;

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

* [PATCH] omap2+: pm: Fix section mismatch in pm_dbg_init()
  2011-06-20 21:09 ` Kevin Hilman
@ 2011-06-20 21:16   ` Russell King - ARM Linux
  2011-06-20 22:18     ` Kevin Hilman
  0 siblings, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2011-06-20 21:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jun 20, 2011 at 02:09:39PM -0700, Kevin Hilman wrote:
> Sanjeev Premi <premi@ti.com> writes:
> 
> > Fix the section mismatch warning:
> >
> >   WARNING: vmlinux.o(.text+0x21118): Section mismatch
> >   in reference from the function pm_dbg_init() to the
> >   function .init.text:pwrdms_setup()
> >   The function pm_dbg_init() references
> >   the function __init pwrdms_setup().
> >   This is often because pm_dbg_init lacks a __init
> >   annotation or the annotation of pwrdms_setup is wrong.
> >
> > Signed-off-by: Sanjeev Premi <premi@ti.com>
> > ---
> >  Applies to current linux-omap master
> 
> A previous commit just removed the __init annotation here because of a
> different conflict with the regset init.   The regset code is now
> removed in my queue for 3.1, so this patch is fine on top of that
> series.
> 
> Queueing for v3.1 (branch: for_3.1/pm-misc)

Sigh.  Please put some thought into it first and stop applying patches
without first doing some analysis and test-buliding the thing.  Otherwise
you're going to be applying patches for ever which add and delete
these things.

If you make pm_dbg_init() __init, then you also have to make
pm_dbg_regset_init() __init too.  What about the callers to
pm_dbg_regset_init() - are these marked __init or not?  If not,
they too will have to be marked __init, etc.

If that's not possible, then the __init attribute must be deleted
from pwrdms_setup().

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

* [PATCH] omap2+: pm: Fix section mismatch in pm_dbg_init()
  2011-06-20 21:16   ` Russell King - ARM Linux
@ 2011-06-20 22:18     ` Kevin Hilman
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Hilman @ 2011-06-20 22:18 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux <linux@arm.linux.org.uk> writes:

> On Mon, Jun 20, 2011 at 02:09:39PM -0700, Kevin Hilman wrote:
>> Sanjeev Premi <premi@ti.com> writes:
>> 
>> > Fix the section mismatch warning:
>> >
>> >   WARNING: vmlinux.o(.text+0x21118): Section mismatch
>> >   in reference from the function pm_dbg_init() to the
>> >   function .init.text:pwrdms_setup()
>> >   The function pm_dbg_init() references
>> >   the function __init pwrdms_setup().
>> >   This is often because pm_dbg_init lacks a __init
>> >   annotation or the annotation of pwrdms_setup is wrong.
>> >
>> > Signed-off-by: Sanjeev Premi <premi@ti.com>
>> > ---
>> >  Applies to current linux-omap master
>> 
>> A previous commit just removed the __init annotation here because of a
>> different conflict with the regset init.   The regset code is now
>> removed in my queue for 3.1, so this patch is fine on top of that
>> series.
>> 
>> Queueing for v3.1 (branch: for_3.1/pm-misc)
>
> Sigh.  Please put some thought into it first and stop applying patches
> without first doing some analysis and test-buliding the thing.  Otherwise
> you're going to be applying patches for ever which add and delete
> these things.
>
> If you make pm_dbg_init() __init, then you also have to make
> pm_dbg_regset_init() __init too.  What about the callers to
> pm_dbg_regset_init() - are these marked __init or not?  If not,
> they too will have to be marked __init, etc.
>
> If that's not possible, then the __init attribute must be deleted
> from pwrdms_setup().

As I mentioned above, the regset code (pm_dbg_regset_*) is being removed
in a pending series I already have queued.

Thus, adding back the __init here is fine.  

It was thought about and test built.

Kevin

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

end of thread, other threads:[~2011-06-20 22:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-16 20:31 [PATCH] omap2+: pm: Fix section mismatch in pm_dbg_init() Sanjeev Premi
2011-06-20 21:09 ` Kevin Hilman
2011-06-20 21:16   ` Russell King - ARM Linux
2011-06-20 22:18     ` Kevin Hilman

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