qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH 2/2] hw/sd: Remove legacy sd_enable()


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 2/2] hw/sd: Remove legacy sd_enable()
Date: Wed, 6 Nov 2024 18:32:11 +0000
User-agent: Mozilla Thunderbird

On 9/9/24 16:26, Peter Maydell wrote:
On Tue, 3 Sept 2024 at 21:04, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:

sd_enable() was only used by omap_mmc_enable() which
got recently removed. Time to remove it.

Since the SDState::enable boolean is now always %true,
we can remove it and simplify.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

@@ -2328,7 +2327,7 @@ void sd_write_byte(SDState *sd, uint8_t value)
  {
      int i;

-    if (!sd->blk || !blk_is_inserted(sd->blk) || !sd->enable)
+    if (!sd->blk || !blk_is_inserted(sd->blk))
          return;

      if (sd->state != sd_receivingdata_state) {
@@ -2460,7 +2459,7 @@ uint8_t sd_read_byte(SDState *sd)
      uint8_t ret;
      uint32_t io_len;

-    if (!sd->blk || !blk_is_inserted(sd->blk) || !sd->enable)
+    if (!sd->blk || !blk_is_inserted(sd->blk))
          return dummy_byte;

      if (sd->state != sd_sendingdata_state) {

Maybe add the { } that coding style wants to these if()s
since we're editing them anyway?

Sure, I didn't notice.

Either way,
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

Thanks, patch queued.



reply via email to

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