staging/rts_pstor: remove braces {} in sd.c (sd_read_data)
authorToshiaki Yamane <yamanetoshi@gmail.com>
Fri, 7 Sep 2012 04:22:43 +0000 (13:22 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Sep 2012 22:36:03 +0000 (15:36 -0700)
fixed below checkpatch warnings.
-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 3a7f8699576f24bf89daf61785a18f2fefb052bc..45752125058dca5d30b0d84db64c34cd7d1bfa7d 100644 (file)
@@ -320,17 +320,15 @@ static int sd_read_data(struct rtsx_chip *chip,
        if (!buf)
                buf_len = 0;
 
-       if (buf_len > 512) {
+       if (buf_len > 512)
                TRACE_RET(chip, STATUS_FAIL);
-       }
 
        rtsx_init_cmd(chip);
 
        if (cmd_len) {
                RTSX_DEBUGP("SD/MMC CMD %d\n", cmd[0] - 0x40);
-               for (i = 0; i < (cmd_len < 6 ? cmd_len : 6); i++) {
+               for (i = 0; i < (cmd_len < 6 ? cmd_len : 6); i++)
                        rtsx_add_cmd(chip, WRITE_REG_CMD, REG_SD_CMD0 + i, 0xFF, cmd[i]);
-               }
        }
        rtsx_add_cmd(chip, WRITE_REG_CMD, REG_SD_BYTE_CNT_L, 0xFF, (u8)byte_cnt);
        rtsx_add_cmd(chip, WRITE_REG_CMD, REG_SD_BYTE_CNT_H, 0xFF, (u8)(byte_cnt >> 8));
@@ -342,9 +340,9 @@ static int sd_read_data(struct rtsx_chip *chip,
        rtsx_add_cmd(chip, WRITE_REG_CMD, REG_SD_CFG2, 0xFF,
                        SD_CALCULATE_CRC7 | SD_CHECK_CRC16 | SD_NO_WAIT_BUSY_END |
                        SD_CHECK_CRC7 | SD_RSP_LEN_6);
-       if (trans_mode != SD_TM_AUTO_TUNING) {
+       if (trans_mode != SD_TM_AUTO_TUNING)
                rtsx_add_cmd(chip, WRITE_REG_CMD, CARD_DATA_SOURCE, 0x01, PINGPONG_BUFFER);
-       }
+
        rtsx_add_cmd(chip, WRITE_REG_CMD, REG_SD_TRANSFER, 0xFF, trans_mode | SD_TRANSFER_START);
        rtsx_add_cmd(chip, CHECK_REG_CMD, REG_SD_TRANSFER, SD_TRANSFER_END, SD_TRANSFER_END);
 
@@ -360,9 +358,8 @@ static int sd_read_data(struct rtsx_chip *chip,
 
        if (buf && buf_len) {
                retval = rtsx_read_ppbuf(chip, buf, buf_len);
-               if (retval != STATUS_SUCCESS) {
+               if (retval != STATUS_SUCCESS)
                        TRACE_RET(chip, STATUS_FAIL);
-               }
        }
 
        return STATUS_SUCCESS;