omap2+: pm: Fix section mismatch in pm_dbg_init()
PATCH 1/1 omap2+: pm: Fix section mismatch in pm_dbg_init()
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.
---
Applies to current linux-omap master
arch/arm/mach-omap2/pm-debug.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/pm-debug.c +1 -1
@@ -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;
Signature · 1 line
1.7.2.2
PATCH 1/1 omap2+: pm: Fix section mismatch in pm_dbg_init()
Quoted 10 lines · Sanjeev Premi
Fix the section mismatch warning:
WARNING:
vmlinux.o(.text+0x21118): Section mismatch in reference from the functionpm_dbg_init()to the function .init.text:pwrdms_setup()
The functionpm_dbg_init()references
the function__initpwrdms_setup().
This is often becausepm_dbg_initlacks a__initannotation or the annotation ofpwrdms_setupis wrong.
Quoted 3 lines
Signed-off-by Sanjeev Premi <[email protected]>---
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
Quoted 17 lines
arch/arm/mach-omap2/pm-debug.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/mach-omap2/pm-debug.c +1
-1@@ -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;
PATCH 1/1 omap2+: pm: Fix section mismatch in pm_dbg_init()
Quoted 16 lines · Kevin Hilman
Quoted 10 lines · Sanjeev Premi
Fix the section mismatch warning:
WARNING:
vmlinux.o(.text+0x21118): Section mismatch in reference from the functionpm_dbg_init()to the function .init.text:pwrdms_setup()
The functionpm_dbg_init()references
the function__initpwrdms_setup().
This is often becausepm_dbg_initlacks a__initannotation or the annotation ofpwrdms_setupis wrong.Quoted 3 lines
Signed-off-by Sanjeev Premi <[email protected]>---
Applies to current linux-omap master
Quoted 6 lines
A previous commit just removed the
__initannotation 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().
PATCH 1/1 omap2+: pm: Fix section mismatch in pm_dbg_init()
Quoted 29 lines · Russell King - ARM Linux
Quoted 16 lines · Kevin Hilman
Quoted 10 lines · Sanjeev Premi
Fix the section mismatch warning:
WARNING:
vmlinux.o(.text+0x21118): Section mismatch in reference from the functionpm_dbg_init()to the function .init.text:pwrdms_setup()
The functionpm_dbg_init()references
the function__initpwrdms_setup().
This is often becausepm_dbg_initlacks a__initannotation or the annotation ofpwrdms_setupis wrong.Quoted 3 lines
Signed-off-by Sanjeev Premi <[email protected]>---
Applies to current linux-omap masterQuoted 6 lines
A previous commit just removed the
__initannotation 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.
Quoted 7 lines
If you make
pm_dbg_init()__init, then you also have to makepm_dbg_regset_init()__inittoo. What about the callers topm_dbg_regset_init()- are these marked__initor not? If not, they too will have to be marked__init, etc.If that's not possible, then the
__initattribute must be deleted frompwrdms_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