Skip to content

Commit 0ea4c39

Browse files
albankurtiojeda
authored andcommitted
rust: workqueue: add missing newline to pr_info! examples
The documentation examples in rust/kernel/workqueue.rs use pr_info! calls that lack a trailing newline. To maintain consistency with kernel logging practices, this patch adds the newline to all affected examples. Fixes: 15b286d ("rust: workqueue: add examples") Reported-by: Miguel Ojeda <ojeda@kernel.org> Link: Rust-for-Linux#1139 Signed-off-by: Alban Kurti <kurti@invicto.ai> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20250206-printing_fix-v3-5-a85273b501ae@invicto.ai [ Replaced Closes with Link since it fixes part of the issue. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent 50c3e77 commit 0ea4c39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rust/kernel/workqueue.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
//! type Pointer = Arc<MyStruct>;
6161
//!
6262
//! fn run(this: Arc<MyStruct>) {
63-
//! pr_info!("The value is: {}", this.value);
63+
//! pr_info!("The value is: {}\n", this.value);
6464
//! }
6565
//! }
6666
//!
@@ -108,15 +108,15 @@
108108
//! type Pointer = Arc<MyStruct>;
109109
//!
110110
//! fn run(this: Arc<MyStruct>) {
111-
//! pr_info!("The value is: {}", this.value_1);
111+
//! pr_info!("The value is: {}\n", this.value_1);
112112
//! }
113113
//! }
114114
//!
115115
//! impl WorkItem<2> for MyStruct {
116116
//! type Pointer = Arc<MyStruct>;
117117
//!
118118
//! fn run(this: Arc<MyStruct>) {
119-
//! pr_info!("The second value is: {}", this.value_2);
119+
//! pr_info!("The second value is: {}\n", this.value_2);
120120
//! }
121121
//! }
122122
//!

0 commit comments

Comments
 (0)