aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/sgi-ip22
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2014-10-21 08:12:49 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-11-24 01:44:49 -0500
commit635c99070600ff04b4c1d5afe67f051631a8397c (patch)
tree1ce0df0757aeebf58adb202d63a1525ff16abfd6 /arch/mips/sgi-ip22
parent5d01410fe4d92081f349b013a2e7a95429e4f2c9 (diff)
MIPS: Remove useless parentheses
Based on the spatch @@ expression e; @@ - return (e); + return e; with heavy hand editing because some of the changes are either whitespace or identation only or result in excessivly long lines. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/sgi-ip22')
-rw-r--r--arch/mips/sgi-ip22/ip22-mc.c6
-rw-r--r--arch/mips/sgi-ip22/ip28-berr.c6
2 files changed, 5 insertions, 7 deletions
diff --git a/arch/mips/sgi-ip22/ip22-mc.c b/arch/mips/sgi-ip22/ip22-mc.c
index 7cec0a4e527d..6b009c45abed 100644
--- a/arch/mips/sgi-ip22/ip22-mc.c
+++ b/arch/mips/sgi-ip22/ip22-mc.c
@@ -24,14 +24,12 @@ EXPORT_SYMBOL(sgimc);
24 24
25static inline unsigned long get_bank_addr(unsigned int memconfig) 25static inline unsigned long get_bank_addr(unsigned int memconfig)
26{ 26{
27 return ((memconfig & SGIMC_MCONFIG_BASEADDR) << 27 return (memconfig & SGIMC_MCONFIG_BASEADDR) << ((sgimc->systemid & SGIMC_SYSID_MASKREV) >= 5 ? 24 : 22);
28 ((sgimc->systemid & SGIMC_SYSID_MASKREV) >= 5 ? 24 : 22));
29} 28}
30 29
31static inline unsigned long get_bank_size(unsigned int memconfig) 30static inline unsigned long get_bank_size(unsigned int memconfig)
32{ 31{
33 return ((memconfig & SGIMC_MCONFIG_RMASK) + 0x0100) << 32 return ((memconfig & SGIMC_MCONFIG_RMASK) + 0x0100) << ((sgimc->systemid & SGIMC_SYSID_MASKREV) >= 5 ? 16 : 14);
34 ((sgimc->systemid & SGIMC_SYSID_MASKREV) >= 5 ? 16 : 14);
35} 33}
36 34
37static inline unsigned int get_bank_config(int bank) 35static inline unsigned int get_bank_config(int bank)
diff --git a/arch/mips/sgi-ip22/ip28-berr.c b/arch/mips/sgi-ip22/ip28-berr.c
index 3f47346608d7..712cc0f6a58d 100644
--- a/arch/mips/sgi-ip22/ip28-berr.c
+++ b/arch/mips/sgi-ip22/ip28-berr.c
@@ -338,7 +338,7 @@ static int check_microtlb(u32 hi, u32 lo, unsigned long vaddr)
338 PHYS_TO_XKSEG_UNCACHED(pte); 338 PHYS_TO_XKSEG_UNCACHED(pte);
339 a = (a & 0x3f) << 6; /* PFN */ 339 a = (a & 0x3f) << 6; /* PFN */
340 a += vaddr & ((1 << pgsz) - 1); 340 a += vaddr & ((1 << pgsz) - 1);
341 return (cpu_err_addr == a); 341 return cpu_err_addr == a;
342 } 342 }
343 } 343 }
344 } 344 }
@@ -351,7 +351,7 @@ static int check_vdma_memaddr(void)
351 u32 a = sgimc->maddronly; 351 u32 a = sgimc->maddronly;
352 352
353 if (!(sgimc->dma_ctrl & 0x100)) /* Xlate-bit clear ? */ 353 if (!(sgimc->dma_ctrl & 0x100)) /* Xlate-bit clear ? */
354 return (cpu_err_addr == a); 354 return cpu_err_addr == a;
355 355
356 if (check_microtlb(sgimc->dtlb_hi0, sgimc->dtlb_lo0, a) || 356 if (check_microtlb(sgimc->dtlb_hi0, sgimc->dtlb_lo0, a) ||
357 check_microtlb(sgimc->dtlb_hi1, sgimc->dtlb_lo1, a) || 357 check_microtlb(sgimc->dtlb_hi1, sgimc->dtlb_lo1, a) ||
@@ -367,7 +367,7 @@ static int check_vdma_gioaddr(void)
367 if (gio_err_stat & GIO_ERRMASK) { 367 if (gio_err_stat & GIO_ERRMASK) {
368 u32 a = sgimc->gio_dma_trans; 368 u32 a = sgimc->gio_dma_trans;
369 a = (sgimc->gmaddronly & ~a) | (sgimc->gio_dma_sbits & a); 369 a = (sgimc->gmaddronly & ~a) | (sgimc->gio_dma_sbits & a);
370 return (gio_err_addr == a); 370 return gio_err_addr == a;
371 } 371 }
372 return 0; 372 return 0;
373} 373}