summaryrefslogtreecommitdiff
path: root/rust/kernel/prelude.rs
diff options
context:
space:
mode:
authorWedson Almeida Filho <wedsonaf@google.com>2024-10-22 23:31:45 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-11-05 05:33:46 +0100
commit5c7ca6fa603fc669253b166649ba635a38a9d7ee (patch)
tree66278fc7b86a761db358784b74813313e20cb3b3 /rust/kernel/prelude.rs
parent7f15c46a57c31956591f85b713d7e63cccb25556 (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 <wedsonaf@google.com> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel.org/r/20241022213221.2383-9-dakr@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/kernel/prelude.rs')
-rw-r--r--rust/kernel/prelude.rs2
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};