Reduce coupling to implementation details of the formatting machinery by avoiding direct use for `core`'s formatting traits and macros.
Acked-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> Reviewed-by: Alice Ryhl <alicer...@google.com> Reviewed-by: Benno Lossin <los...@kernel.org> Acked-by: Danilo Krummrich <d...@kernel.org> Signed-off-by: Tamir Duberstein <tam...@gmail.com> --- rust/kernel/device.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/kernel/device.rs b/rust/kernel/device.rs index 5c946af3a4d5..9e9ecdb1beec 100644 --- a/rust/kernel/device.rs +++ b/rust/kernel/device.rs @@ -5,11 +5,11 @@ //! C header: [`include/linux/device.h`](srctree/include/linux/device.h) use crate::{ - bindings, + bindings, fmt, str::CStr, types::{ARef, Opaque}, }; -use core::{fmt, marker::PhantomData, ptr}; +use core::{marker::PhantomData, ptr}; #[cfg(CONFIG_PRINTK)] use crate::c_str; @@ -345,7 +345,7 @@ macro_rules! impl_device_context_into_aref { macro_rules! dev_printk { ($method:ident, $dev:expr, $($f:tt)*) => { { - ($dev).$method(::core::format_args!($($f)*)); + ($dev).$method($crate::prelude::fmt!($($f)*)); } } } -- 2.50.1