Skip to content

Commit ad4fdde

Browse files
roxelltsbogend
authored andcommitted
mips: fix Section mismatch in reference
When building mips tinyconfig with clang the following error show up: WARNING: modpost: vmlinux.o(.text+0x1940c): Section mismatch in reference from the function r4k_cache_init() to the function .init.text:loongson3_sc_init() The function r4k_cache_init() references the function __init loongson3_sc_init(). This is often because r4k_cache_init lacks a __init annotation or the annotation of loongson3_sc_init is wrong. Remove marked __init from function loongson3_sc_init(), mips_sc_probe_cm3(), and mips_sc_probe(). Signed-off-by: Anders Roxell <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 3bd5a23 commit ad4fdde

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

arch/mips/mm/c-r4k.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,7 @@ static void __init loongson2_sc_init(void)
16091609
c->options |= MIPS_CPU_INCLUSIVE_CACHES;
16101610
}
16111611

1612-
static void __init loongson3_sc_init(void)
1612+
static void loongson3_sc_init(void)
16131613
{
16141614
struct cpuinfo_mips *c = &current_cpu_data;
16151615
unsigned int config2, lsize;

arch/mips/mm/sc-mips.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static inline int mips_sc_is_activated(struct cpuinfo_mips *c)
146146
return 1;
147147
}
148148

149-
static int __init mips_sc_probe_cm3(void)
149+
static int mips_sc_probe_cm3(void)
150150
{
151151
struct cpuinfo_mips *c = &current_cpu_data;
152152
unsigned long cfg = read_gcr_l2_config();
@@ -180,7 +180,7 @@ static int __init mips_sc_probe_cm3(void)
180180
return 0;
181181
}
182182

183-
static inline int __init mips_sc_probe(void)
183+
static inline int mips_sc_probe(void)
184184
{
185185
struct cpuinfo_mips *c = &current_cpu_data;
186186
unsigned int config1, config2;

0 commit comments

Comments
 (0)