From: Toshiaki Yamane Date: Fri, 7 Sep 2012 04:29:00 +0000 (+0900) Subject: staging/rts_pstor: remove braces {} in sd.c (sd_switch_function) X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=07d1aeace9eedc4e24b928796a4640493df295bd;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging/rts_pstor: remove braces {} in sd.c (sd_switch_function) 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rts_pstor/sd.c b/drivers/staging/rts_pstor/sd.c index c90deb6bafb8..558f25b3bc25 100644 --- a/drivers/staging/rts_pstor/sd.c +++ b/drivers/staging/rts_pstor/sd.c @@ -1224,9 +1224,8 @@ static int sd_switch_function(struct rtsx_chip *chip, u8 bus_width) /* Get supported functions */ retval = sd_check_switch_mode(chip, SD_CHECK_MODE, NO_ARGUMENT, NO_ARGUMENT, bus_width); - if (retval != STATUS_SUCCESS) { + if (retval != STATUS_SUCCESS) TRACE_RET(chip, STATUS_FAIL); - } sd_card->func_group1_mask &= ~(sd_card->sd_switch_fail); @@ -1255,9 +1254,9 @@ static int sd_switch_function(struct rtsx_chip *chip, u8 bus_width) break; case HS_SUPPORT: - if (sd_card->func_group1_mask & HS_SUPPORT_MASK) { + if (sd_card->func_group1_mask & HS_SUPPORT_MASK) func_to_switch = HS_SUPPORT; - } + break; default: @@ -1265,9 +1264,9 @@ static int sd_switch_function(struct rtsx_chip *chip, u8 bus_width) } - if (func_to_switch) { + if (func_to_switch) break; - } + } RTSX_DEBUGP("SD_FUNC_GROUP_1: func_to_switch = 0x%02x", func_to_switch); @@ -1296,23 +1295,21 @@ static int sd_switch_function(struct rtsx_chip *chip, u8 bus_width) TRACE_RET(chip, STATUS_FAIL); } - if (func_to_switch == SDR104_SUPPORT) { + if (func_to_switch == SDR104_SUPPORT) SET_SD_SDR104(sd_card); - } else if (func_to_switch == DDR50_SUPPORT) { + else if (func_to_switch == DDR50_SUPPORT) SET_SD_DDR50(sd_card); - } else if (func_to_switch == SDR50_SUPPORT) { + else if (func_to_switch == SDR50_SUPPORT) SET_SD_SDR50(sd_card); - } else { + else SET_SD_HS(sd_card); - } } if (CHK_SD_DDR50(sd_card)) { RTSX_WRITE_REG(chip, SD_PUSH_POINT_CTL, 0x06, 0x04); retval = sd_set_sample_push_timing(chip); - if (retval != STATUS_SUCCESS) { + if (retval != STATUS_SUCCESS) TRACE_RET(chip, STATUS_FAIL); - } } if (!func_to_switch || (func_to_switch == HS_SUPPORT)) { @@ -1328,36 +1325,35 @@ static int sd_switch_function(struct rtsx_chip *chip, u8 bus_width) for (i = 0; i < 4; i++) { switch ((u8)(chip->sd_current_prior >> (i*8))) { case CURRENT_LIMIT_800: - if (sd_card->func_group4_mask & CURRENT_LIMIT_800_MASK) { + if (sd_card->func_group4_mask & CURRENT_LIMIT_800_MASK) func_to_switch = CURRENT_LIMIT_800; - } + break; case CURRENT_LIMIT_600: - if (sd_card->func_group4_mask & CURRENT_LIMIT_600_MASK) { + if (sd_card->func_group4_mask & CURRENT_LIMIT_600_MASK) func_to_switch = CURRENT_LIMIT_600; - } + break; case CURRENT_LIMIT_400: - if (sd_card->func_group4_mask & CURRENT_LIMIT_400_MASK) { + if (sd_card->func_group4_mask & CURRENT_LIMIT_400_MASK) func_to_switch = CURRENT_LIMIT_400; - } + break; case CURRENT_LIMIT_200: - if (sd_card->func_group4_mask & CURRENT_LIMIT_200_MASK) { + if (sd_card->func_group4_mask & CURRENT_LIMIT_200_MASK) func_to_switch = CURRENT_LIMIT_200; - } + break; default: continue; } - if (func_to_switch != 0xFF) { + if (func_to_switch != 0xFF) break; - } } RTSX_DEBUGP("SD_FUNC_GROUP_4: func_to_switch = 0x%02x", func_to_switch); @@ -1365,16 +1361,14 @@ static int sd_switch_function(struct rtsx_chip *chip, u8 bus_width) if (func_to_switch <= CURRENT_LIMIT_800) { retval = sd_check_switch(chip, SD_FUNC_GROUP_4, func_to_switch, bus_width); if (retval != STATUS_SUCCESS) { - if (sd_check_err_code(chip, SD_NO_CARD)) { + if (sd_check_err_code(chip, SD_NO_CARD)) TRACE_RET(chip, STATUS_FAIL); - } } RTSX_DEBUGP("Switch current limit finished! (%d)\n", retval); } - if (CHK_SD_DDR50(sd_card)) { + if (CHK_SD_DDR50(sd_card)) RTSX_WRITE_REG(chip, SD_PUSH_POINT_CTL, 0x06, 0); - } return STATUS_SUCCESS; }