Commit 081d835f authored by Kevin Cernekee's avatar Kevin Cernekee Committed by Ralf Baechle

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: default avatarKevin Cernekee <cernekee@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/1752/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent c15524a4
...@@ -68,6 +68,9 @@ static struct bcache_ops mips_sc_ops = { ...@@ -68,6 +68,9 @@ static struct bcache_ops mips_sc_ops = {
*/ */
static inline int mips_sc_is_activated(struct cpuinfo_mips *c) static inline int mips_sc_is_activated(struct cpuinfo_mips *c)
{ {
unsigned int config2 = read_c0_config2();
unsigned int tmp;
/* Check the bypass bit (L2B) */ /* Check the bypass bit (L2B) */
switch (c->cputype) { switch (c->cputype) {
case CPU_34K: case CPU_34K:
...@@ -83,6 +86,7 @@ static inline int mips_sc_is_activated(struct cpuinfo_mips *c) ...@@ -83,6 +86,7 @@ static inline int mips_sc_is_activated(struct cpuinfo_mips *c)
c->scache.linesz = 2 << tmp; c->scache.linesz = 2 << tmp;
else else
return 0; return 0;
return 1;
} }
static inline int __init mips_sc_probe(void) static inline int __init mips_sc_probe(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment