diff options
author | Wedson Almeida Filho <[email protected]> | 2024-10-22 23:31:45 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2024-11-05 05:33:46 +0100 |
commit | 5c7ca6fa603fc669253b166649ba635a38a9d7ee (patch) | |
tree | 66278fc7b86a761db358784b74813313e20cb3b3 /rust/kernel/prelude.rs | |
parent | 7f15c46a57c31956591f85b713d7e63cccb25556 (diff) |
rust: add `dev_*` print macros.
Implement `dev_*` print macros for `device::Device`.
They behave like the macros with the same names in C, i.e., they print
messages to the kernel ring buffer with the given level, prefixing the
messages with corresponding device information.
Signed-off-by: Wedson Almeida Filho <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'rust/kernel/prelude.rs')
-rw-r--r-- | rust/kernel/prelude.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rust/kernel/prelude.rs b/rust/kernel/prelude.rs index 4571daec0961..86cd96608b8e 100644 --- a/rust/kernel/prelude.rs +++ b/rust/kernel/prelude.rs @@ -27,6 +27,8 @@ pub use super::build_assert; // `super::std_vendor` is hidden, which makes the macro inline for some reason. #[doc(no_inline)] pub use super::dbg; +pub use super::fmt; +pub use super::{dev_alert, dev_crit, dev_dbg, dev_emerg, dev_err, dev_info, dev_notice, dev_warn}; pub use super::{pr_alert, pr_crit, pr_debug, pr_emerg, pr_err, pr_info, pr_notice, pr_warn}; pub use super::{init, pin_init, try_init, try_pin_init}; |