-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix missing \n
in printing calls such as pr_*!
and dev_*!
#1139
Comments
First time looking at issues for the project, but I wasn't able to find any missing \n in any printing calls other than in the documentation examples, I looked at the rust/ directory, am I missing something? |
@albankurti also check the samples directory, |
Emailed fix for what I found in samples/ |
Fix adding a newline at the end of the usage of pr_info! in the documentation Fixes: e3c3d34 ("docs: rust: Add description of Rust documentation test as KUnit ones") Reported-by: Miguel Ojeda <ojeda@kernel.org> Closes: Rust-for-Linux#1139 Signed-off-by: Alban Kurti <kurti@invicto.ai>
Added missing newline at the end of pr_warn! usage so the log is not missed. Fixes: 6551a7f ("rust: error: Add Error::from_errno{_unchecked}()") Reported-by: Miguel Ojeda <ojeda@kernel.org> Closes: Rust-for-Linux#1139 Signed-off-by: Alban Kurti <kurti@invicto.ai>
Several pr_info! calls in rust/kernel/init.rs (both in code examples and macro documentation) were missing a newline, causing logs to run together. This commit updates these calls to include a trailing newline, improving readability and consistency with the C side. Fixes: 6841d45 ("rust: init: add `stack_pin_init!` macro") Fixes: 7f8977a ("rust: init: add `{pin_}chain` functions to `{Pin}Init<T, E>`") Fixes: d0fdc39 ("rust: init: add `PinnedDrop` trait and macros") Reported-by: Miguel Ojeda <ojeda@kernel.org> Closes: Rust-for-Linux#1139 Signed-off-by: Alban Kurti <kurti@invicto.ai>
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>
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>
The sample code in samples/rust/rust_print_main.rs contained pr_info! calls without a newline. This commit updates those calls, ensuring that the output is properly formatted when the sample is run. Fixes: f431c5c ("samples: rust: print: Add sample code for Arc printing") Fixes: 47cb6bf ("rust: use derive(CoercePointee) on rustc >= 1.84.0") Reported-by: Miguel Ojeda <ojeda@kernel.org> Closes: Rust-for-Linux#1139 Signed-off-by: Alban Kurti <kurti@invicto.ai>
Fix missing
\n
in printing calls such aspr_*!
anddev_*!
.This requires submitting a proper patch to the LKML and the Rust for Linux mailing list. Please recall to test your changes (including generating the documentation if changed, running the Rust doctests if changed, etc.), to use a proper title for the commit, to sign your commit under the Developer's Certificate of Origin and to add a
Reported-by: tag
, aCloses:
tag to this issue and aFixes:
tag to the relevant commit. Please see https://docs.kernel.org/process/submitting-patches.html and https://rust-for-linux.com/contributing for details.Please take this issue only if you are new to the kernel development process and you would like to use it as a test to submit your first patch to the kernel. Please do not take it if you do not plan to make other contributions to the kernel.
The text was updated successfully, but these errors were encountered: