[PATCH 01/23] hw/sd/sdcard: Correct code indentation

Philippe Mathieu-Daudé posted 23 patches 6 months, 1 week ago
There is a newer version of this series
[PATCH 01/23] hw/sd/sdcard: Correct code indentation
Posted by Philippe Mathieu-Daudé 6 months, 1 week ago
Fix mis-alignment from commits 793d04f495 and 6380cd2052
("Add sd_cmd_SEND_TUNING_BLOCK" and "Add sd_cmd_SET_BLOCK_COUNT").

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/sd/sd.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 16d8d52a78..626e99ecd6 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -1069,33 +1069,33 @@ static sd_rsp_type_t sd_cmd_SEND_RELATIVE_ADDR(SDState *sd, SDRequest req)
 
 static sd_rsp_type_t sd_cmd_SEND_TUNING_BLOCK(SDState *sd, SDRequest req)
 {
-        if (sd->spec_version < SD_PHY_SPECv3_01_VERS) {
-            return sd_cmd_illegal(sd, req);
-        }
+    if (sd->spec_version < SD_PHY_SPECv3_01_VERS) {
+        return sd_cmd_illegal(sd, req);
+    }
 
-        if (sd->state != sd_transfer_state) {
-            return sd_invalid_state_for_cmd(sd, req);
-        }
+    if (sd->state != sd_transfer_state) {
+        return sd_invalid_state_for_cmd(sd, req);
+    }
 
-        sd->state = sd_sendingdata_state;
-        sd->data_offset = 0;
+    sd->state = sd_sendingdata_state;
+    sd->data_offset = 0;
 
-        return sd_r1;
+    return sd_r1;
 }
 
 static sd_rsp_type_t sd_cmd_SET_BLOCK_COUNT(SDState *sd, SDRequest req)
 {
-        if (sd->spec_version < SD_PHY_SPECv3_01_VERS) {
-            return sd_cmd_illegal(sd, req);
-        }
+    if (sd->spec_version < SD_PHY_SPECv3_01_VERS) {
+        return sd_cmd_illegal(sd, req);
+    }
 
-        if (sd->state != sd_transfer_state) {
-            return sd_invalid_state_for_cmd(sd, req);
-        }
+    if (sd->state != sd_transfer_state) {
+        return sd_invalid_state_for_cmd(sd, req);
+    }
 
-        sd->multi_blk_cnt = req.arg;
+    sd->multi_blk_cnt = req.arg;
 
-        return sd_r1;
+    return sd_r1;
 }
 
 static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req)
-- 
2.41.0


Re: [PATCH 01/23] hw/sd/sdcard: Correct code indentation
Posted by Cédric Le Goater 6 months, 1 week ago
On 6/21/24 10:05 AM, Philippe Mathieu-Daudé wrote:
> Fix mis-alignment from commits 793d04f495 and 6380cd2052
> ("Add sd_cmd_SEND_TUNING_BLOCK" and "Add sd_cmd_SET_BLOCK_COUNT").
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/sd/sd.c | 34 +++++++++++++++++-----------------
>   1 file changed, 17 insertions(+), 17 deletions(-)



Reviewed-by: Cédric Le Goater <clg@redhat.com>

Thanks,

C.


> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
> index 16d8d52a78..626e99ecd6 100644
> --- a/hw/sd/sd.c
> +++ b/hw/sd/sd.c
> @@ -1069,33 +1069,33 @@ static sd_rsp_type_t sd_cmd_SEND_RELATIVE_ADDR(SDState *sd, SDRequest req)
>   
>   static sd_rsp_type_t sd_cmd_SEND_TUNING_BLOCK(SDState *sd, SDRequest req)
>   {
> -        if (sd->spec_version < SD_PHY_SPECv3_01_VERS) {
> -            return sd_cmd_illegal(sd, req);
> -        }
> +    if (sd->spec_version < SD_PHY_SPECv3_01_VERS) {
> +        return sd_cmd_illegal(sd, req);
> +    }
>   
> -        if (sd->state != sd_transfer_state) {
> -            return sd_invalid_state_for_cmd(sd, req);
> -        }
> +    if (sd->state != sd_transfer_state) {
> +        return sd_invalid_state_for_cmd(sd, req);
> +    }
>   
> -        sd->state = sd_sendingdata_state;
> -        sd->data_offset = 0;
> +    sd->state = sd_sendingdata_state;
> +    sd->data_offset = 0;
>   
> -        return sd_r1;
> +    return sd_r1;
>   }
>   
>   static sd_rsp_type_t sd_cmd_SET_BLOCK_COUNT(SDState *sd, SDRequest req)
>   {
> -        if (sd->spec_version < SD_PHY_SPECv3_01_VERS) {
> -            return sd_cmd_illegal(sd, req);
> -        }
> +    if (sd->spec_version < SD_PHY_SPECv3_01_VERS) {
> +        return sd_cmd_illegal(sd, req);
> +    }
>   
> -        if (sd->state != sd_transfer_state) {
> -            return sd_invalid_state_for_cmd(sd, req);
> -        }
> +    if (sd->state != sd_transfer_state) {
> +        return sd_invalid_state_for_cmd(sd, req);
> +    }
>   
> -        sd->multi_blk_cnt = req.arg;
> +    sd->multi_blk_cnt = req.arg;
>   
> -        return sd_r1;
> +    return sd_r1;
>   }
>   
>   static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req)