[PATCH 07/23] hw/sd/sdcard: Remove ACMD6 handler for SPI mode

Philippe Mathieu-Daudé posted 23 patches 6 months, 1 week ago
There is a newer version of this series
[PATCH 07/23] hw/sd/sdcard: Remove ACMD6 handler for SPI mode
Posted by Philippe Mathieu-Daudé 6 months, 1 week ago
There is no ACMD6 command in SPI mode, remove the pointless
handler introduced in commit 946897ce18 ("sdcard: handles
more commands in SPI mode"). Keep sd_cmd_unimplemented()
since we'll reuse it later.

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

diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index b0cd30c657..e9af834a8c 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -1012,6 +1012,7 @@ static sd_rsp_type_t sd_cmd_illegal(SDState *sd, SDRequest req)
 }
 
 /* Commands that are recognised but not yet implemented. */
+__attribute__((unused))
 static sd_rsp_type_t sd_cmd_unimplemented(SDState *sd, SDRequest req)
 {
     qemu_log_mask(LOG_UNIMP, "%s: CMD%i not implemented\n",
@@ -2153,7 +2154,6 @@ static const SDProto sd_proto_spi = {
         [52 ... 54] = sd_cmd_illegal,
     },
     .acmd = {
-        [6]         = sd_cmd_unimplemented,
         [41]        = spi_cmd_SEND_OP_COND,
     },
 };
-- 
2.41.0


Re: [PATCH 07/23] hw/sd/sdcard: Remove ACMD6 handler for SPI mode
Posted by Cédric Le Goater 6 months, 1 week ago
On 6/21/24 10:05 AM, Philippe Mathieu-Daudé wrote:
> There is no ACMD6 command in SPI mode, remove the pointless
> handler introduced in commit 946897ce18 ("sdcard: handles
> more commands in SPI mode"). Keep sd_cmd_unimplemented()
> since we'll reuse it later.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>


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

Thanks,

C.


> ---
>   hw/sd/sd.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
> index b0cd30c657..e9af834a8c 100644
> --- a/hw/sd/sd.c
> +++ b/hw/sd/sd.c
> @@ -1012,6 +1012,7 @@ static sd_rsp_type_t sd_cmd_illegal(SDState *sd, SDRequest req)
>   }
>   
>   /* Commands that are recognised but not yet implemented. */
> +__attribute__((unused))
>   static sd_rsp_type_t sd_cmd_unimplemented(SDState *sd, SDRequest req)
>   {
>       qemu_log_mask(LOG_UNIMP, "%s: CMD%i not implemented\n",
> @@ -2153,7 +2154,6 @@ static const SDProto sd_proto_spi = {
>           [52 ... 54] = sd_cmd_illegal,
>       },
>       .acmd = {
> -        [6]         = sd_cmd_unimplemented,
>           [41]        = spi_cmd_SEND_OP_COND,
>       },
>   };