From: Lyude Paul <lyude@redhat.com>
To: dri-devel@lists.freedesktop.org, nova-gpu@lists.linux.dev
Cc: "Alexandre Courbot" <acourbot@nvidia.com>,
linux-kernel@vger.kernel.org, "Simona Vetter" <simona@ffwll.ch>,
"Alice Ryhl" <aliceryhl@google.com>,
"David Airlie" <airlied@gmail.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Lyude Paul" <lyude@redhat.com>
Subject: [PATCH] gpu: nova-core: vbios: Fix clippy error in Vbios::new()
Date: Wed, 27 May 2026 13:15:21 -0400 [thread overview]
Message-ID: <20260527171521.2406456-1-lyude@redhat.com> (raw)
>From clippy:
error: this `if` can be collapsed into the outer `match`
--> drivers/gpu/nova-core/vbios.rs:328:21
|
328 | / if pci_at_image.is_none() {
329 | | pci_at_image = Some(PciAtBiosImage::try_from(image)?);
330 | | }
| |_____________________^
|
There should be no functional changes in this patch.
Signed-off-by: Lyude Paul <lyude@redhat.com>
---
drivers/gpu/nova-core/vbios.rs | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/nova-core/vbios.rs b/drivers/gpu/nova-core/vbios.rs
index c0bc1008ed752..d38d7f138b49d 100644
--- a/drivers/gpu/nova-core/vbios.rs
+++ b/drivers/gpu/nova-core/vbios.rs
@@ -323,11 +323,9 @@ pub(crate) fn new(dev: &device::Device, bar0: &Bar0) -> Result<Vbios> {
// Convert to a specific image type
match BiosImageType::try_from(image.pcir.code_type) {
- Ok(BiosImageType::PciAt) => {
+ Ok(BiosImageType::PciAt) if pci_at_image.is_none() => {
// Silently ignore any extra PCI-AT images.
- if pci_at_image.is_none() {
- pci_at_image = Some(PciAtBiosImage::try_from(image)?);
- }
+ pci_at_image = Some(PciAtBiosImage::try_from(image)?);
}
Ok(BiosImageType::FwSec) => fwsec_section = Some(image.data),
_ => {
base-commit: 2cf1840b0fa7637b6731fd554529f8d57ea34c04
--
2.54.0
next reply other threads:[~2026-05-27 17:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 17:15 Lyude Paul [this message]
2026-05-28 1:12 ` [PATCH] gpu: nova-core: vbios: Fix clippy error in Vbios::new() Alexandre Courbot
2026-05-28 2:09 ` Claude review: " Claude Code Review Bot
2026-05-28 2:09 ` Claude Code Review Bot
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=20260527171521.2406456-1-lyude@redhat.com \
--to=lyude@redhat.com \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=simona@ffwll.ch \
/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