Skip to content

Commit 50c3e77

Browse files
albankurtiojeda
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 <ojeda@kernel.org> Link: Rust-for-Linux#1139 Signed-off-by: Alban Kurti <kurti@invicto.ai> Link: https://lore.kernel.org/r/20250206-printing_fix-v3-4-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 6933c10 commit 50c3e77

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)