Skip to content

Commit

Permalink
rust: sync: add missing newline in locked_by log example
Browse files Browse the repository at this point in the history
The pr_info! example in rust/kernel/sync/locked_by.rs was missing
a newline. This patch appends the missing newline to ensure
that log messages for locked resources display correctly.

Fixes: 7b1f55e ("rust: sync: introduce `LockedBy`")
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 f42db2a commit c2febbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/kernel/sync/locked_by.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ use core::{cell::UnsafeCell, mem::size_of, ptr};
/// fn print_bytes_used(dir: &Directory, file: &File) {
/// let guard = dir.inner.lock();
/// let inner_file = file.inner.access(&guard);
/// pr_info!("{} {}", guard.bytes_used, inner_file.bytes_used);
/// pr_info!("{} {}\n", guard.bytes_used, inner_file.bytes_used);
/// }
///
/// /// Increments `bytes_used` for both the directory and file.
Expand Down

0 comments on commit c2febbd

Please sign in to comment.