staging/rts_pstor: remove braces {} in sd.c (mmc_test_switch_bus)
authorToshiaki Yamane <yamanetoshi@gmail.com>
Fri, 7 Sep 2012 04:35:14 +0000 (13:35 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Sep 2012 22:36:06 +0000 (15:36 -0700)
fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for any arm of this statement
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rts_pstor/sd.c

index 23fe9f21aa98e81e28672c39d0b1105d745b3b59..ff8eb9688625244a1b974ff5fb8b8782aaab79aa 100644 (file)
@@ -2544,9 +2544,8 @@ static int mmc_test_switch_bus(struct rtsx_chip *chip, u8 width)
        int len;
 
        retval = sd_send_cmd_get_rsp(chip, BUSTEST_W, 0, SD_RSP_TYPE_R1, NULL, 0);
-       if (retval != STATUS_SUCCESS) {
+       if (retval != STATUS_SUCCESS)
                TRACE_RET(chip, SWITCH_FAIL);
-       }
 
        if (width == MMC_8BIT_BUS) {
                buf[0] = 0x55;
@@ -2575,9 +2574,8 @@ static int mmc_test_switch_bus(struct rtsx_chip *chip, u8 width)
                        rtsx_read_register(chip, REG_SD_STAT1, &val1);
                        rtsx_read_register(chip, REG_SD_STAT2, &val2);
                        rtsx_clear_sd_error(chip);
-                       if ((val1 & 0xE0) || val2) {
+                       if ((val1 & 0xE0) || val2)
                                TRACE_RET(chip, SWITCH_ERR);
-                       }
                } else {
                        rtsx_clear_sd_error(chip);
                        rtsx_write_register(chip, REG_SD_CFG3, 0x02, 0);
@@ -2597,11 +2595,10 @@ static int mmc_test_switch_bus(struct rtsx_chip *chip, u8 width)
 
        rtsx_add_cmd(chip, WRITE_REG_CMD, REG_SD_CMD0, 0xFF, 0x40 | BUSTEST_R);
 
-       if (width == MMC_8BIT_BUS) {
+       if (width == MMC_8BIT_BUS)
                rtsx_add_cmd(chip, WRITE_REG_CMD, REG_SD_BYTE_CNT_L, 0xFF, 0x08);
-       } else {
+       else
                rtsx_add_cmd(chip, WRITE_REG_CMD, REG_SD_BYTE_CNT_L, 0xFF, 0x04);
-       }
 
        rtsx_add_cmd(chip, WRITE_REG_CMD, REG_SD_BLOCK_CNT_L, 0xFF, 1);
        rtsx_add_cmd(chip, WRITE_REG_CMD, REG_SD_BLOCK_CNT_H, 0xFF, 0);
@@ -2614,9 +2611,8 @@ static int mmc_test_switch_bus(struct rtsx_chip *chip, u8 width)
        rtsx_add_cmd(chip, CHECK_REG_CMD, REG_SD_TRANSFER, SD_TRANSFER_END, SD_TRANSFER_END);
 
        rtsx_add_cmd(chip, READ_REG_CMD, PPBUF_BASE2, 0, 0);
-       if (width == MMC_8BIT_BUS) {
+       if (width == MMC_8BIT_BUS)
                rtsx_add_cmd(chip, READ_REG_CMD, PPBUF_BASE2 + 1, 0, 0);
-       }
 
        retval = rtsx_send_cmd(chip, SD_CARD, 100);
        if (retval < 0) {
@@ -2632,15 +2628,14 @@ static int mmc_test_switch_bus(struct rtsx_chip *chip, u8 width)
                        u8 rsp[5];
                        u32 arg;
 
-                       if (CHK_MMC_DDR52(sd_card)) {
+                       if (CHK_MMC_DDR52(sd_card))
                                arg = 0x03B70600;
-                       } else {
+                       else
                                arg = 0x03B70200;
-                       }
+
                        retval = sd_send_cmd_get_rsp(chip, SWITCH, arg, SD_RSP_TYPE_R1b, rsp, 5);
-                       if ((retval == STATUS_SUCCESS) && !(rsp[4] & MMC_SWITCH_ERR)) {
+                       if ((retval == STATUS_SUCCESS) && !(rsp[4] & MMC_SWITCH_ERR))
                                return SWITCH_SUCCESS;
-                       }
                }
        } else {
                RTSX_DEBUGP("BUSTEST_R [4bits]: 0x%02x\n", ptr[0]);
@@ -2648,15 +2643,14 @@ static int mmc_test_switch_bus(struct rtsx_chip *chip, u8 width)
                        u8 rsp[5];
                        u32 arg;
 
-                       if (CHK_MMC_DDR52(sd_card)) {
+                       if (CHK_MMC_DDR52(sd_card))
                                arg = 0x03B70500;
-                       } else {
+                       else
                                arg = 0x03B70100;
-                       }
+
                        retval = sd_send_cmd_get_rsp(chip, SWITCH, arg, SD_RSP_TYPE_R1b, rsp, 5);
-                       if ((retval == STATUS_SUCCESS) && !(rsp[4] & MMC_SWITCH_ERR)) {
+                       if ((retval == STATUS_SUCCESS) && !(rsp[4] & MMC_SWITCH_ERR))
                                return SWITCH_SUCCESS;
-                       }
                }
        }