lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DCHNPZ8G5FP8.3VTQ0RQMQ6NT@kernel.org>
Date: Mon, 01 Sep 2025 19:58:11 +0200
From: "Danilo Krummrich" <dakr@...nel.org>
To: "John Hubbard" <jhubbard@...dia.com>
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 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]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ