Skip to contentSkip to conversation

ARM: bcm: mark bcm_kona_smc_init as __init

PATCH New Arnd Bergmann 2 participants 2 messages Apr 23, 2013 – Apr 26, 2013

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

PATCH 1/1 ARM: bcm: mark bcm_kona_smc_init as __init

The bcm_kona_smc_init function references the bcm_kona_smc_ids variable that is marked __initconst, so the function itself has to be __init to avoid this build error:

WARNING: arch/arm/mach-bcm/built-in.o(.text+0x12c): Section mismatch in reference from the function bcm_kona_smc_init() to the (unknown reference) .init.rodata:(unknown)

Cc Christian Daudt <[email protected]>

---
I have applied this trivial fix to the next/firmware branch

arch/arm/mach-bcm/bcm_kona_smc.c +1 -1
index 5f1d131..56d9d19 100644
@@ -41,7 +41,7 @@ static const struct of_device_id bcm_kona_smc_ids[] __initconst = {
 };
 
 /* Map in the bounce area */
-void bcm_kona_smc_init(void)
+void __init bcm_kona_smc_init(void)
 {
 	struct device_node *node;
 
#1 lore raw

PATCH 1/1 ARM: bcm: mark bcm_kona_smc_init as __init

Quoted 17 lines · Arnd Bergmann

The bcm_kona_smc_init function references the bcm_kona_smc_ids variable that is marked __initconst, so the function itself has to be __init to avoid this build error:

WARNING: arch/arm/mach-bcm/built-in.o(.text+0x12c): Section mismatch in reference from the function bcm_kona_smc_init() to the (unknown reference) .init.rodata:(unknown)

Cc Christian Daudt <[email protected]>

---
I have applied this trivial fix to the next/firmware branch

arch/arm/mach-bcm/bcm_kona_smc.c +0 -0
index 5f1d131..56d9d19 100644

arch/arm/mach-bcm/bcm_kona_smc.c static const struct of_device_id bcm_kona_smc_ids[] __initconst = { · line 47

Quoted 8 lines
arch/arm/mach-bcm/bcm_kona_smc.c +1 -1
@@ -41,7 +41,7 @@ static const struct of_device_id bcm_kona_smc_ids[] __initconst = {
  };
 
  /* Map in the bounce area */
-void bcm_kona_smc_init(void)
+void __init bcm_kona_smc_init(void)
  {
  	struct device_node *node;