qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH-for-9.1 1/5] hw/sd/sdcard: Explicit dummy byte value


From: Richard Henderson
Subject: Re: [PATCH-for-9.1 1/5] hw/sd/sdcard: Explicit dummy byte value
Date: Wed, 31 Jul 2024 14:29:38 +1000
User-agent: Mozilla Thunderbird

On 7/30/24 19:21, Philippe Mathieu-Daudé wrote:
On error the DAT lines are left unmodified to their
previous states. QEMU returns 0x00 for convenience.

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

diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 07cb97d88c..c02f04f1ea 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -2478,20 +2478,22 @@ void sd_write_byte(SDState *sd, uint8_t value)
  uint8_t sd_read_byte(SDState *sd)
  {
      /* TODO: Append CRCs */
+    static const uint8_t dummy_byte = 0x00;

A zero doesn't need to be static.

Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]