Skip to contentSkip to conversation

ARM: tegra: fix section mismatch in tegra_pmc_parse_dt

PATCH New Stephen Warren 3 participants 4 messages Jun 21, 2013 – Jun 25, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: tegra: fix section mismatch in tegra_pmc_parse_dt

From: Stephen Warren <[email protected]>

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)

---
 arch/arm/mach-tegra/pmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-tegra/pmc.c +1 -1
index 32360e5..eb3fa4a 100644
@@ -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;
Signature · 1 line
1.8.1.5
#1 lore raw

PATCH 1/1 ARM: tegra: fix section mismatch in tegra_pmc_parse_dt

Quoted 10 lines · Stephen Warren

From: Stephen Warren <[email protected]>

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

#2 lore raw

PATCH 1/1 ARM: tegra: fix section mismatch in tegra_pmc_parse_dt

Quoted 7 lines · Joseph Lo
Quoted 6 lines · Stephen Warren

From: Stephen Warren <[email protected]>

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:

Quoted 8 lines
Quoted 4 lines

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.

#3 lore raw

PATCH 1/1 ARM: tegra: fix section mismatch in tegra_pmc_parse_dt

In reply to Stephen Warren
Quoted 6 lines · Stephen Warren

From: Stephen Warren <[email protected]>

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:

Quoted 6 lines

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

---

Applied to fixes-non-critical.

-Olof