From: "Danilo Krummrich" <dakr@kernel.org>
To: "John Hubbard" <jhubbard@nvidia.com>
Cc: "Alexandre Courbot" <acourbot@nvidia.com>,
"Joel Fernandes" <joelagnelf@nvidia.com>,
"Timur Tabi" <ttabi@nvidia.com>,
"Alistair Popple" <apopple@nvidia.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <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>,
nouveau@lists.freedesktop.org, linux-pci@vger.kernel.org,
rust-for-linux@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
"Elle Rhumsaa" <elle@weathered-steel.dev>
Subject: Re: [PATCH v8 0/6] rust, nova-core: PCI Class, Vendor support
Date: Mon, 01 Sep 2025 19:58:11 +0200 [thread overview]
Message-ID: <DCHNPZ8G5FP8.3VTQ0RQMQ6NT@kernel.org> (raw)
In-Reply-To: <20250829223632.144030-1-jhubbard@nvidia.com>
On Sat Aug 30, 2025 at 12:36 AM CEST, John Hubbard wrote:
> Changes since v7:
>
> * Applied changes from Danilo's and Alex's and reviews (thanks!):
> * Removed a blank line, one each, from the Class and Vendor macros.
> * Moved example code location from struct Vendor, to vendor_id(),
> and introduced it in a later commit, in its final form.
> * Applied Alex's Reviewed-by tag to the series.
I think you forgot to align Debug and Display, i.e. Debug still prints decimal
values.
Is this intentional? If not, no worries, I can fix it up on apply (which a few
minor doc-comment nits):
diff --git a/rust/kernel/pci/id.rs b/rust/kernel/pci/id.rs
index f6ce8f8a2a4d..f534133aed3d 100644
--- a/rust/kernel/pci/id.rs
+++ b/rust/kernel/pci/id.rs
@@ -26,7 +26,7 @@
/// Ok(())
/// }
/// ```
-#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+#[derive(Clone, Copy, PartialEq, Eq)]
#[repr(transparent)]
pub struct Class(u32);
@@ -81,12 +81,18 @@ const fn to_24bit_class(val: u32) -> u32 {
}
}
-impl fmt::Display for Class {
+impl fmt::Debug for Class {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "0x{:06x}", self.0)
}
}
+impl fmt::Display for Class {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ <Self as fmt::Debug>::fmt(self, f)
+ }
+}
+
impl ClassMask {
/// Get the raw mask value.
#[inline]
next prev parent reply other threads:[~2025-09-01 17:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 22:36 [PATCH v8 0/6] rust, nova-core: PCI Class, Vendor support John Hubbard
2025-08-29 22:36 ` [PATCH v8 1/6] rust: pci: provide access to PCI Class and Class-related items John Hubbard
2025-08-29 22:36 ` [PATCH v8 2/6] rust: pci: provide access to PCI Vendor values John Hubbard
2025-08-29 22:36 ` [PATCH v8 3/6] rust: pci: add DeviceId::from_class_and_vendor() method John Hubbard
2025-08-29 22:36 ` [PATCH v8 4/6] gpu: nova-core: avoid probing non-display/compute PCI functions John Hubbard
2025-08-29 22:36 ` [PATCH v8 5/6] rust: pci: use pci::Vendor instead of bindings::PCI_VENDOR_ID_* John Hubbard
2025-08-29 22:36 ` [PATCH v8 6/6] rust: pci: inline several tiny functions John Hubbard
2025-09-01 17:58 ` Danilo Krummrich [this message]
2025-09-01 18:44 ` [PATCH v8 0/6] rust, nova-core: PCI Class, Vendor support John Hubbard
2025-09-01 20:26 ` Danilo Krummrich
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=DCHNPZ8G5FP8.3VTQ0RQMQ6NT@kernel.org \
--to=dakr@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=bhelgaas@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=elle@weathered-steel.dev \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=joelagnelf@nvidia.com \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lossin@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 \
/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).