Skip to content

Commit 081d835

Browse files
cernekeeralfbaechle
authored andcommitted
MIPS: Fix build errors in sc-mips.c
Seen with malta_defconfig on Linus' tree: CC arch/mips/mm/sc-mips.o arch/mips/mm/sc-mips.c: In function 'mips_sc_is_activated': arch/mips/mm/sc-mips.c:77: error: 'config2' undeclared (first use in this function) arch/mips/mm/sc-mips.c:77: error: (Each undeclared identifier is reported only once arch/mips/mm/sc-mips.c:77: error: for each function it appears in.) arch/mips/mm/sc-mips.c:81: error: 'tmp' undeclared (first use in this function) make[2]: *** [arch/mips/mm/sc-mips.o] Error 1 make[1]: *** [arch/mips/mm] Error 2 make: *** [arch/mips] Error 2 [Ralf: Cosmetic changes to minimize the number of arguments passed to mips_sc_is_activated] Signed-off-by: Kevin Cernekee <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/1752/ Signed-off-by: Ralf Baechle <[email protected]>
1 parent c15524a commit 081d835

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/mips/mm/sc-mips.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ static struct bcache_ops mips_sc_ops = {
6868
*/
6969
static inline int mips_sc_is_activated(struct cpuinfo_mips *c)
7070
{
71+
unsigned int config2 = read_c0_config2();
72+
unsigned int tmp;
73+
7174
/* Check the bypass bit (L2B) */
7275
switch (c->cputype) {
7376
case CPU_34K:
@@ -83,6 +86,7 @@ static inline int mips_sc_is_activated(struct cpuinfo_mips *c)
8386
c->scache.linesz = 2 << tmp;
8487
else
8588
return 0;
89+
return 1;
8690
}
8791

8892
static inline int __init mips_sc_probe(void)

0 commit comments

Comments
 (0)