[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c0cb3015-a01f-4148-9fca-1d42464376b5@nvidia.com>
Date: Mon, 1 Sep 2025 08:44:48 -1000
From: John Hubbard <jhubbard@...dia.com>
To: Danilo Krummrich <dakr@...nel.org>
Cc: Alexandre Courbot <acourbot@...dia.com>,
Joel Fernandes <joelagnelf@...dia.com>, Timur Tabi <ttabi@...dia.com>,
Alistair Popple <apopple@...dia.com>, David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>, Bjorn Helgaas <bhelgaas@...gle.com>,
Krzysztof Wilczyński <kwilczynski@...nel.org>,
Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
nouveau@...ts.freedesktop.org, linux-pci@...r.kernel.org,
rust-for-linux@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
Elle Rhumsaa <elle@...thered-steel.dev>
Subject: Re: [PATCH v8 0/6] rust, nova-core: PCI Class, Vendor support
On 9/1/25 7:58 AM, Danilo Krummrich wrote:
> 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):
Yes, I missed that one. Fixup on apply would be great, yes.
thanks,
John Hubbard
>
> 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]
Powered by blists - more mailing lists