Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: samples: driver-core: remove redundant `.as_ref()` for `dev_*` print

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>

authored by

Gary Guo and committed by
Danilo Krummrich
3be458a5 600de1c0

+4 -6
+1 -1
samples/rust/rust_driver_auxiliary.rs
··· 39 39 40 40 fn probe(adev: &auxiliary::Device<Core>, _info: &Self::IdInfo) -> impl PinInit<Self, Error> { 41 41 dev_info!( 42 - adev.as_ref(), 42 + adev, 43 43 "Probing auxiliary driver for auxiliary device with id={}\n", 44 44 adev.id() 45 45 );
+1 -1
samples/rust/rust_driver_faux.rs
··· 26 26 27 27 let reg = faux::Registration::new(c"rust-faux-sample-device", None)?; 28 28 29 - dev_info!(reg.as_ref(), "Hello from faux device!\n"); 29 + dev_info!(reg, "Hello from faux device!\n"); 30 30 31 31 Ok(Self { _reg: reg }) 32 32 }
+1 -1
samples/rust/rust_driver_platform.rs
··· 180 180 181 181 impl Drop for SampleDriver { 182 182 fn drop(&mut self) { 183 - dev_dbg!(self.pdev.as_ref(), "Remove Rust Platform driver sample.\n"); 183 + dev_dbg!(self.pdev, "Remove Rust Platform driver sample.\n"); 184 184 } 185 185 } 186 186
+1 -3
samples/rust/rust_soc.rs
··· 44 44 pdev: &platform::Device<Core>, 45 45 _info: Option<&Self::IdInfo>, 46 46 ) -> impl PinInit<Self, Error> { 47 - let dev = pdev.as_ref(); 48 - 49 - dev_dbg!(dev, "Probe Rust SoC driver sample.\n"); 47 + dev_dbg!(pdev, "Probe Rust SoC driver sample.\n"); 50 48 51 49 let pdev = pdev.into(); 52 50 pin_init_scope(move || {