On 9/9/24 16:26, Peter Maydell wrote:
On Tue, 3 Sept 2024 at 21:04, Philippe Mathieu-Daudé <phi...@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é <phi...@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.mayd...@linaro.org>

Thanks, patch queued.

Reply via email to