From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Daniel P . Berrangé" <berrange@redhat.com>,
qemu-riscv@nongnu.org, qemu-ppc@nongnu.org,
"Paolo Bonzini" <pbonzini@redhat.com>,
qemu-s390x@nongnu.org, qemu-arm@nongnu.org
Subject: Re: [PATCH-for-10.0 3/3] hw/boards: Rename no_sdcard -> create_default_sdcard_drive
Date: Tue, 4 Feb 2025 12:09:15 +0100 [thread overview]
Message-ID: <04b4c0f6-aa4c-4c95-b93e-7a16d58b5567@linaro.org> (raw)
In-Reply-To: <47db9d33-8fa4-4ebf-90c9-db6e252cc38e@redhat.com>
On 4/2/25 08:07, Thomas Huth wrote:
> On 25/11/2024 19.14, Philippe Mathieu-Daudé wrote:
>> Invert the 'no_sdcard' logic, renaming it as the more
>> explicit "create_default_sdcard_drive". Machines are
>> supposed to create a SD Card drive when this flag is
>> set. In many cases it doesn't make much sense (as
>> boards don't expose SD Card host controller),
>
> This indeed shows the insanity of the previous state, thanks for
> tackling it!
>
>> but this
>> is patch only aims to expose that nonsense; so no
>> logical change intended (mechanical patch using gsed).
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
> ...
>> diff --git a/include/hw/boards.h b/include/hw/boards.h
>> index 86fcf9c81f..5cec73ae68 100644
>> --- a/include/hw/boards.h
>> +++ b/include/hw/boards.h
>> @@ -285,7 +285,7 @@ struct MachineClass {
>> no_cdrom:1,
>> pci_allow_0_address:1,
>> legacy_fw_cfg_order:1;
>> - OnOffAuto no_sdcard;
>> + bool create_default_sdcard_drive;
>
> Can we maybe still bikeshed about the naming here? The current name is a
> little bit long, and maybe we could "standardize" the prefix of the
> flags here a little bit. We already have one switch starting with
> "has_..." and some others starting with "auto_enable_...", so I'd maybe
> suggest one of those instead:
>
> has_default_sdcard
> auto_enable_sdcard
I added "drive" within the name, because this option isn't only
about automatically creating a SD Card device, but also attach
a block drive to it, and 'create_default_sdcard_drive' was shorter
than 'implictly_create_sdcard_if_drive_provided'.
I'll repost using 'auto_create_sdcard' as compromise, also shorter
than 'auto_create_sdcard_for_drive'.
Thanks for the review,
Phil.
next prev parent reply other threads:[~2025-02-04 11:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-25 18:14 [PATCH-for-10.0 0/3] hw/boards: Try to make sense of MachineClass::no_sdcard flag Philippe Mathieu-Daudé
2024-11-25 18:14 ` [PATCH-for-10.0 1/3] hw/boards: Convert no_sdcard flag to OnOffAuto tri-state Philippe Mathieu-Daudé
2025-02-04 6:59 ` Thomas Huth
2024-11-25 18:14 ` [PATCH-for-10.0 2/3] hw/boards: Explicit no_sdcard=false as ON_OFF_AUTO_OFF Philippe Mathieu-Daudé
2025-02-04 7:00 ` Thomas Huth
2024-11-25 18:14 ` [PATCH-for-10.0 3/3] hw/boards: Rename no_sdcard -> create_default_sdcard_drive Philippe Mathieu-Daudé
2025-02-04 7:07 ` Thomas Huth
2025-02-04 11:09 ` Philippe Mathieu-Daudé [this message]
2024-11-26 5:24 ` [PATCH-for-10.0 0/3] hw/boards: Try to make sense of MachineClass::no_sdcard flag Philippe Mathieu-Daudé
2025-02-04 7:11 ` Thomas Huth
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=04b4c0f6-aa4c-4c95-b93e-7a16d58b5567@linaro.org \
--to=philmd@linaro.org \
--cc=berrange@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@redhat.com \
/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).