Skip to content

Commit

Permalink
rust: workqueue: add missing newline to pr_info! examples
Browse files Browse the repository at this point in the history
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>
Closes: Rust-for-Linux#1139
Signed-off-by: Alban Kurti <kurti@invicto.ai>
  • Loading branch information
albankurti authored and intel-lab-lkp committed Feb 6, 2025
1 parent c2febbd commit 312206b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rust/kernel/workqueue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
//! type Pointer = Arc<MyStruct>;
//!
//! fn run(this: Arc<MyStruct>) {
//! pr_info!("The value is: {}", this.value);
//! pr_info!("The value is: {}\n", this.value);
//! }
//! }
//!
Expand Down Expand Up @@ -108,15 +108,15 @@
//! type Pointer = Arc<MyStruct>;
//!
//! fn run(this: Arc<MyStruct>) {
//! pr_info!("The value is: {}", this.value_1);
//! pr_info!("The value is: {}\n", this.value_1);
//! }
//! }
//!
//! impl WorkItem<2> for MyStruct {
//! type Pointer = Arc<MyStruct>;
//!
//! fn run(this: Arc<MyStruct>) {
//! pr_info!("The second value is: {}", this.value_2);
//! pr_info!("The second value is: {}\n", this.value_2);
//! }
//! }
//!
Expand Down

0 comments on commit 312206b

Please sign in to comment.