From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
qemu-block@nongnu.org, Bin Meng <bmeng.cn@gmail.com>
Subject: Re: [PATCH 2/2] hw/sd: Remove legacy sd_enable()
Date: Wed, 6 Nov 2024 18:32:11 +0000 [thread overview]
Message-ID: <91f2315b-daaa-4e5f-88cf-e001cf10c9c1@linaro.org> (raw)
In-Reply-To: <CAFEAcA-Ny03OHMHFKu8kSbPSJsiJRqR+qmhDOg6jsM9HtT6FCw@mail.gmail.com>
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.
prev parent reply other threads:[~2024-11-06 18:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 20:04 [PATCH 0/2] hw/sd: Remove a pair of legacy methods Philippe Mathieu-Daudé
2024-09-03 20:04 ` [PATCH 1/2] hw/sd: Remove legacy sd_set_cb() Philippe Mathieu-Daudé
2024-09-03 20:10 ` Philippe Mathieu-Daudé
2024-09-03 20:49 ` Guenter Roeck
2024-09-09 15:30 ` Peter Maydell
2024-09-13 8:28 ` Markus Armbruster
2024-09-13 9:39 ` Peter Maydell
2024-09-13 9:41 ` Markus Armbruster
2024-09-03 20:04 ` [PATCH 2/2] hw/sd: Remove legacy sd_enable() Philippe Mathieu-Daudé
2024-09-09 15:26 ` Peter Maydell
2024-11-06 18:32 ` Philippe Mathieu-Daudé [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=91f2315b-daaa-4e5f-88cf-e001cf10c9c1@linaro.org \
--to=philmd@linaro.org \
--cc=armbru@redhat.com \
--cc=bmeng.cn@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).