[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260123175854.176735-6-gary@kernel.org>
Date: Fri, 23 Jan 2026 17:58:43 +0000
From: Gary Guo <gary@...nel.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Danilo Krummrich <dakr@...nel.org>,
Miguel Ojeda <ojeda@...nel.org>,
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>
Cc: rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 6/8] rust: samples: usb: remove redundant `.as_ref()` for `dev_*` print
From: Gary Guo <gary@...yguo.net>
This is now handled by the macro itself.
Signed-off-by: Gary Guo <gary@...yguo.net>
---
samples/rust/rust_driver_usb.rs | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/samples/rust/rust_driver_usb.rs b/samples/rust/rust_driver_usb.rs
index ab72e99e1274..1da02fba3d09 100644
--- a/samples/rust/rust_driver_usb.rs
+++ b/samples/rust/rust_driver_usb.rs
@@ -33,15 +33,13 @@ fn probe(
_id: &usb::DeviceId,
_info: &Self::IdInfo,
) -> impl PinInit<Self, Error> {
- let dev: &device::Device<Core> = intf.as_ref();
- dev_info!(dev, "Rust USB driver sample probed\n");
+ dev_info!(intf, "Rust USB driver sample probed\n");
Ok(Self { _intf: intf.into() })
}
fn disconnect(intf: &usb::Interface<Core>, _data: Pin<&Self>) {
- let dev: &device::Device<Core> = intf.as_ref();
- dev_info!(dev, "Rust USB driver sample disconnected\n");
+ dev_info!(intf, "Rust USB driver sample disconnected\n");
}
}
--
2.51.2
Powered by blists - more mailing lists