]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rust: samples: driver-core: remove redundant `.as_ref()` for `dev_*` print
authorGary Guo <gary@garyguo.net>
Fri, 23 Jan 2026 17:58:40 +0000 (17:58 +0000)
committerDanilo Krummrich <dakr@kernel.org>
Sat, 24 Jan 2026 00:12:49 +0000 (01:12 +0100)
This is now handled by the macro itself.

Signed-off-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260123175854.176735-3-gary@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
samples/rust/rust_driver_auxiliary.rs
samples/rust/rust_driver_faux.rs
samples/rust/rust_driver_platform.rs
samples/rust/rust_soc.rs

index f148124fe81fb2adf5545eb3a87d4b0e0e5c0d48..c20961f168356c6bbe0faefc0079d7a90b013684 100644 (file)
@@ -39,7 +39,7 @@ impl auxiliary::Driver for AuxiliaryDriver {
 
     fn probe(adev: &auxiliary::Device<Core>, _info: &Self::IdInfo) -> impl PinInit<Self, Error> {
         dev_info!(
-            adev.as_ref(),
+            adev,
             "Probing auxiliary driver for auxiliary device with id={}\n",
             adev.id()
         );
index 5330b77ea9862206326da5f30ecdb19e86960611..99876c8e3743f79d9403501d9e500a32bf0e2786 100644 (file)
@@ -26,7 +26,7 @@ impl Module for SampleModule {
 
         let reg = faux::Registration::new(c"rust-faux-sample-device", None)?;
 
-        dev_info!(reg.as_ref(), "Hello from faux device!\n");
+        dev_info!(reg, "Hello from faux device!\n");
 
         Ok(Self { _reg: reg })
     }
index 9537dc38c563abd931c58a918d0e539ea2148aea..f2229d176fb98d970622dd948178af0a1157298f 100644 (file)
@@ -180,7 +180,7 @@ impl SampleDriver {
 
 impl Drop for SampleDriver {
     fn drop(&mut self) {
-        dev_dbg!(self.pdev.as_ref(), "Remove Rust Platform driver sample.\n");
+        dev_dbg!(self.pdev, "Remove Rust Platform driver sample.\n");
     }
 }
 
index 403c1137af779d3c660786959d6f5160f934f4ae..8079c1c4841625e52917105c3263771cf04b5d7d 100644 (file)
@@ -44,9 +44,7 @@ impl platform::Driver for SampleSocDriver {
         pdev: &platform::Device<Core>,
         _info: Option<&Self::IdInfo>,
     ) -> impl PinInit<Self, Error> {
-        let dev = pdev.as_ref();
-
-        dev_dbg!(dev, "Probe Rust SoC driver sample.\n");
+        dev_dbg!(pdev, "Probe Rust SoC driver sample.\n");
 
         let pdev = pdev.into();
         pin_init_scope(move || {