]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
MIPS: c-r4k: Fix section mismatch for loongson2_sc_init
authorNathan Chancellor <natechancellor@gmail.com>
Tue, 5 Jan 2021 20:34:56 +0000 (13:34 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Mar 2021 15:44:16 +0000 (16:44 +0100)
[ Upstream commit c58734eee6a2151ba033c0dcb31902c89e310374 ]

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")
Link: https://github.com/ClangBuiltLinux/linux/issues/787
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Huacai Chen <chenhuacai@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/mips/mm/c-r4k.c

index 6c0147bd8e801f67a158738fb0575da8608f35b5..90f8d6d51f316f1a995580a85fa10cc7e4310ad5 100644 (file)
@@ -1401,7 +1401,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;