From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Joel Fernandes" <joelagnelf@nvidia.com>,
<linux-kernel@vger.kernel.org>, <rust-for-linux@vger.kernel.org>,
<dri-devel@lists.freedesktop.org>, <dakr@kernel.org>,
<acourbot@nvidia.com>
Cc: "Alistair Popple" <apopple@nvidia.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>, <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"John Hubbard" <jhubbard@nvidia.com>,
"Timur Tabi" <ttabi@nvidia.com>, <joel@joelfernandes.org>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
<nouveau@lists.freedesktop.org>
Subject: Re: [PATCH v2] nova-core: vbios: Rework BiosImage to be simpler
Date: Thu, 16 Oct 2025 08:19:40 +0900 [thread overview]
Message-ID: <DDJA432ZT4VN.1OR5IBE322IAC@nvidia.com> (raw)
In-Reply-To: <20251009004732.2287050-1-joelagnelf@nvidia.com>
On Thu Oct 9, 2025 at 9:47 AM JST, Joel Fernandes wrote:
> Currently, the BiosImage type in vbios code is implemented as a
> type-wrapping enum with the sole purpose of implementing a type that is
> common to all specific image types. To make this work, macros were used
> to overcome limitations of using enums. Ugly match statements were also
> required to route methods from the enum type to the specific image type.
>
> Simplify the code by just creating the common BiosImage type in the
> iterator, and then converting it to specific image type after. This
> works well since all the methods common to different BiosImage are
> called only during the iteration and not later. Should we need to call
> these common methods later, we can use AsRef and traits, but for now not
> doing so gives us a nice ~50 negative line delta versus the existing code
> and is a lot simpler.
>
> Also remove the now obsolete BiosImage enum type.
>
> Cc: Benno Lossin <lossin@kernel.org>
> Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
Pushed to drm-rust-next! Thank you.
prev parent reply other threads:[~2025-10-15 23:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-09 0:47 [PATCH v2] nova-core: vbios: Rework BiosImage to be simpler Joel Fernandes
2025-10-15 23:19 ` Alexandre Courbot [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=DDJA432ZT4VN.1OR5IBE322IAC@nvidia.com \
--to=acourbot@nvidia.com \
--cc=a.hindborg@kernel.org \
--cc=airlied@gmail.com \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=joel@joelfernandes.org \
--cc=joelagnelf@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=tmgross@umich.edu \
--cc=ttabi@nvidia.com \
--cc=tzimmermann@suse.de \
/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).