aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-09-16 07:04:24 -0400
committerBrian Norris <computersforpeace@gmail.com>2014-09-19 12:39:26 -0400
commit7d14ecd050a43ff80ad284027a521390af1c29be (patch)
tree5f16fa60f95acf44cd98ba5e515f9dce441cb3d4 /drivers/mtd/nand
parentba5f2bc2afbf598aa2efb35542cd0d40fce76c45 (diff)
mtd: denali: remove unnecessary parentheses
We should use parentheses only when they are necessary or they really improve the readability. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/denali.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index e5c39d2d659f..945943e6aab5 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -267,10 +267,10 @@ static void nand_onfi_timing_set(struct denali_nand_info *denali,
267 267
268 acc_clks = CEIL_DIV(Trea[mode], CLK_X); 268 acc_clks = CEIL_DIV(Trea[mode], CLK_X);
269 269
270 while (((acc_clks * CLK_X) - Trea[mode]) < 3) 270 while (acc_clks * CLK_X - Trea[mode] < 3)
271 acc_clks++; 271 acc_clks++;
272 272
273 if ((data_invalid - acc_clks * CLK_X) < 2) 273 if (data_invalid - acc_clks * CLK_X < 2)
274 dev_warn(denali->dev, "%s, Line %d: Warning!\n", 274 dev_warn(denali->dev, "%s, Line %d: Warning!\n",
275 __FILE__, __LINE__); 275 __FILE__, __LINE__);
276 276
@@ -285,7 +285,7 @@ static void nand_onfi_timing_set(struct denali_nand_info *denali,
285 cs_cnt = 1; 285 cs_cnt = 1;
286 286
287 if (Tcea[mode]) { 287 if (Tcea[mode]) {
288 while (((cs_cnt * CLK_X) + Trea[mode]) < Tcea[mode]) 288 while (cs_cnt * CLK_X + Trea[mode] < Tcea[mode])
289 cs_cnt++; 289 cs_cnt++;
290 } 290 }
291 291
@@ -295,8 +295,8 @@ static void nand_onfi_timing_set(struct denali_nand_info *denali,
295#endif 295#endif
296 296
297 /* Sighting 3462430: Temporary hack for MT29F128G08CJABAWP:B */ 297 /* Sighting 3462430: Temporary hack for MT29F128G08CJABAWP:B */
298 if ((ioread32(denali->flash_reg + MANUFACTURER_ID) == 0) && 298 if (ioread32(denali->flash_reg + MANUFACTURER_ID) == 0 &&
299 (ioread32(denali->flash_reg + DEVICE_ID) == 0x88)) 299 ioread32(denali->flash_reg + DEVICE_ID) == 0x88)
300 acc_clks = 6; 300 acc_clks = 6;
301 301
302 iowrite32(acc_clks, denali->flash_reg + ACC_CLKS); 302 iowrite32(acc_clks, denali->flash_reg + ACC_CLKS);
@@ -577,7 +577,7 @@ static void denali_set_intr_modes(struct denali_nand_info *denali,
577 */ 577 */
578static inline bool is_flash_bank_valid(int flash_bank) 578static inline bool is_flash_bank_valid(int flash_bank)
579{ 579{
580 return (flash_bank >= 0 && flash_bank < 4); 580 return flash_bank >= 0 && flash_bank < 4;
581} 581}
582 582
583static void denali_irq_init(struct denali_nand_info *denali) 583static void denali_irq_init(struct denali_nand_info *denali)
@@ -1293,7 +1293,7 @@ static int denali_erase(struct mtd_info *mtd, int page)
1293 irq_status = wait_for_irq(denali, INTR_STATUS__ERASE_COMP | 1293 irq_status = wait_for_irq(denali, INTR_STATUS__ERASE_COMP |
1294 INTR_STATUS__ERASE_FAIL); 1294 INTR_STATUS__ERASE_FAIL);
1295 1295
1296 return (irq_status & INTR_STATUS__ERASE_FAIL) ? NAND_STATUS_FAIL : PASS; 1296 return irq_status & INTR_STATUS__ERASE_FAIL ? NAND_STATUS_FAIL : PASS;
1297} 1297}
1298 1298
1299static void denali_cmdfunc(struct mtd_info *mtd, unsigned int cmd, int col, 1299static void denali_cmdfunc(struct mtd_info *mtd, unsigned int cmd, int col,