Skip to content

Commit c2febbd

Browse files
albankurtiintel-lab-lkp
authored andcommitted
rust: sync: add missing newline in locked_by log example
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 <[email protected]> Closes: Rust-for-Linux#1139 Signed-off-by: Alban Kurti <[email protected]>
1 parent f42db2a commit c2febbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/kernel/sync/locked_by.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ use core::{cell::UnsafeCell, mem::size_of, ptr};
5555
/// fn print_bytes_used(dir: &Directory, file: &File) {
5656
/// let guard = dir.inner.lock();
5757
/// let inner_file = file.inner.access(&guard);
58-
/// pr_info!("{} {}", guard.bytes_used, inner_file.bytes_used);
58+
/// pr_info!("{} {}\n", guard.bytes_used, inner_file.bytes_used);
5959
/// }
6060
///
6161
/// /// Increments `bytes_used` for both the directory and file.

0 commit comments

Comments
 (0)