Skip to contentSkip to conversation

MIPS: c-r4k: Fix section mismatch for loongson2_sc_init

PATCH Applied Nathan Chancellor 3 participants 3 messages Jan 5, 2021 – Jan 7, 2021 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: c-r4k: Fix section mismatch for loongson2_sc_init

When building with clang, the following section mismatch warning occurs:

WARNING: modpost: vmlinux.o(.text+0x24490): Section mismatch in reference from the function r4k_cache_init() to the function .init.text:loongson2_sc_init()

This should have been fixed with commit ad4fddef5f23 ("mips: fix Section mismatch in reference") but it was missed. Remove the improper __init annotation like that commit did.

Fixes 078a55fc824c ("MIPS: Delete __cpuinit/__CPUINIT usage from MIPS code")
---
 arch/mips/mm/c-r4k.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/mm/c-r4k.c +1 -1
index 4f976d687ab0..f67297b3175f 100644
@@ -1593,7 +1593,7 @@ static int probe_scache(void)
 	return 1;
 }
 
-static void __init loongson2_sc_init(void)
+static void loongson2_sc_init(void)
 {
 	struct cpuinfo_mips *c = &current_cpu_data;
 

base-commit: 36bbbd0e234d817938bdc52121a0f5473b3e58f5

Signature · 1 line
2.30.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 36 lines · Nathan Chancellor

When building with clang, the following section mismatch warning occurs:

WARNING: modpost: vmlinux.o(.text+0x24490): Section mismatch in reference from the function r4k_cache_init() to the function .init.text:loongson2_sc_init()

This should have been fixed with commit ad4fddef5f23 ("mips: fix Section mismatch in reference") but it was missed. Remove the improper __init annotation like that commit did.

Fixes 078a55fc824c ("MIPS: Delete __cpuinit/__CPUINIT usage from MIPS code")
---
 arch/mips/mm/c-r4k.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/mm/c-r4k.c +1 -1
index 4f976d687ab0..f67297b3175f 100644
@@ -1593,7 +1593,7 @@ static int probe_scache(void)
        return 1;
 }
 
-static void __init loongson2_sc_init(void)
+static void loongson2_sc_init(void)
 {
        struct cpuinfo_mips *c = &current_cpu_data;
 

base-commit: 36bbbd0e234d817938bdc52121a0f5473b3e58f5 --
2.30.0

maintainer Applied
#2 lore raw
In reply to Nathan Chancellor
Quoted 10 lines · Nathan Chancellor

When building with clang, the following section mismatch warning occurs:

WARNING: modpost: vmlinux.o(.text+0x24490): Section mismatch in reference from the function r4k_cache_init() to the function .init.text:loongson2_sc_init()

This should have been fixed with commit ad4fddef5f23 ("mips: fix Section mismatch in reference") but it was missed. Remove the improper __init annotation like that commit did.

Quoted 6 lines
Fixes 078a55fc824c ("MIPS: Delete __cpuinit/__CPUINIT usage from MIPS code")
---
 arch/mips/mm/c-r4k.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

applied to mips-next.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]