Commit ad0ade55 authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé Committed by Peter Maydell
Browse files

sdcard: simplify SEND_IF_COND (CMD8)



replace switch(single case) -> if()

Signed-off-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: default avatarAlistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-16-f4bug@amsat.org
Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parent 31162800
Loading
Loading
Loading
Loading
+11 −15
Original line number Diff line number Diff line
@@ -1008,8 +1008,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,

    case 8:	/* CMD8:   SEND_IF_COND */
        /* Physical Layer Specification Version 2.00 command */
        switch (sd->state) {
        case sd_idle_state:
        if (sd->state != sd_idle_state) {
            break;
        }
        sd->vhs = 0;

        /* No response if not exactly one VHS bit is set.  */
@@ -1021,11 +1022,6 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
        sd->vhs = req.arg;
        return sd_r7;

        default:
            break;
        }
        break;

    case 9:	/* CMD9:   SEND_CSD */
        switch (sd->state) {
        case sd_standby_state: