diff mbox

ARM: tegra: fix section mismatch in tegra_pmc_parse_dt

Message ID 1371854347-12091-1-git-send-email-swarren@wwwdotorg.org (mailing list archive)
State New, archived
Headers show

Commit Message

Stephen Warren June 21, 2013, 10:39 p.m. UTC
From: Stephen Warren <swarren@nvidia.com>

tegra_pmc_parse_dt() references __initconst data. Fix it to be __init.
This matches its only usage; a call from tegra_pmc_init() which is
already __init. This fixes:

WARNING: vmlinux.o(.text.unlikely+0x580): Section mismatch in reference
from the function tegra_pmc_parse_dt() to the (unknown reference)
.init.rodata:(unknown)

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 arch/arm/mach-tegra/pmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Joseph Lo June 24, 2013, 2:40 a.m. UTC | #1
On Sat, 2013-06-22 at 06:39 +0800, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
> 
> tegra_pmc_parse_dt() references __initconst data. Fix it to be __init.
> This matches its only usage; a call from tegra_pmc_init() which is
> already __init. This fixes:
> 
> WARNING: vmlinux.o(.text.unlikely+0x580): Section mismatch in reference
> from the function tegra_pmc_parse_dt() to the (unknown reference)
> .init.rodata:(unknown)
> 
Hi Stephen,

Just curious, I don't see this warning message on my system. Does this
cause by some other patch or something else?

Thanks,
Joseph
Stephen Warren June 24, 2013, 3:19 p.m. UTC | #2
On 06/23/2013 08:40 PM, Joseph Lo wrote:
> On Sat, 2013-06-22 at 06:39 +0800, Stephen Warren wrote:
>> From: Stephen Warren <swarren@nvidia.com>
>>
>> tegra_pmc_parse_dt() references __initconst data. Fix it to be __init.
>> This matches its only usage; a call from tegra_pmc_init() which is
>> already __init. This fixes:
>>
>> WARNING: vmlinux.o(.text.unlikely+0x580): Section mismatch in reference
>> from the function tegra_pmc_parse_dt() to the (unknown reference)
>> .init.rodata:(unknown)
>>
> Hi Stephen,
> 
> Just curious, I don't see this warning message on my system. Does this
> cause by some other patch or something else?

The warning only shows up with CONFIG_DEBUG_SECTION_MISMATCH=y, which
isn't in tegra_defconfig.
Olof Johansson June 25, 2013, 6:17 p.m. UTC | #3
On Fri, Jun 21, 2013 at 04:39:07PM -0600, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
> 
> tegra_pmc_parse_dt() references __initconst data. Fix it to be __init.
> This matches its only usage; a call from tegra_pmc_init() which is
> already __init. This fixes:
> 
> WARNING: vmlinux.o(.text.unlikely+0x580): Section mismatch in reference
> from the function tegra_pmc_parse_dt() to the (unknown reference)
> .init.rodata:(unknown)
> 
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---

Applied to fixes-non-critical.


-Olof
diff mbox

Patch

diff --git a/arch/arm/mach-tegra/pmc.c b/arch/arm/mach-tegra/pmc.c
index 32360e5..eb3fa4a 100644
--- a/arch/arm/mach-tegra/pmc.c
+++ b/arch/arm/mach-tegra/pmc.c
@@ -234,7 +234,7 @@  static const struct of_device_id matches[] __initconst = {
 	{ }
 };
 
-static void tegra_pmc_parse_dt(void)
+static void __init tegra_pmc_parse_dt(void)
 {
 	struct device_node *np;
 	u32 prop;