[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250504-pr_info-newline-fix-v4-1-53467c401eb6@invicto.ai>
Date: Sun, 04 May 2025 17:41:14 +0200
From: Alban Kurti via B4 Relay <devnull+kurti.invicto.ai@...nel.org>
To: Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich <dakr@...nel.org>,
Vincenzo Palazzo <vincenzopalazzodev@...il.com>,
Xiangfei Ding <dingxiangfei2009@...il.com>
Cc: Fiona Behrens <me@...enk.dev>, Alban Kurti <kurti@...icto.ai>,
rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v4 1/2] rust: samples: add missing newline to pr_info!
calls in rust_print_main
From: Alban Kurti <kurti@...icto.ai>
Fixes: f431c5c581fa ("samples: rust: print: Add sample code for Arc printing")
Reported-by: Miguel Ojeda <ojeda@...nel.org>
Closes: https://github.com/Rust-for-Linux/linux/issues/1139
Signed-off-by: Alban Kurti <kurti@...icto.ai>
---
samples/rust/rust_print_main.rs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/samples/rust/rust_print_main.rs b/samples/rust/rust_print_main.rs
index 8ea95e8c2f3647650577c4e9dab853e0e3a8bf20..899a6d25f4dc0e0ccebdf4f95aaaf780b425e3af 100644
--- a/samples/rust/rust_print_main.rs
+++ b/samples/rust/rust_print_main.rs
@@ -23,10 +23,10 @@ fn arc_print() -> Result {
let b = UniqueArc::new("hello, world", GFP_KERNEL)?;
// Prints the value of data in `a`.
- pr_info!("{}", a);
+ pr_info!("{}\n", a);
// Uses ":?" to print debug fmt of `b`.
- pr_info!("{:?}", b);
+ pr_info!("{:?}\n", b);
let a: Arc<&str> = b.into();
let c = a.clone();
@@ -53,7 +53,7 @@ fn arc_dyn_print(arc: &Arc<dyn Display>) {
}
// Pretty-prints the debug formatting with lower-case hexadecimal integers.
- pr_info!("{:#x?}", a);
+ pr_info!("{:#x?}\n", a);
Ok(())
}
--
2.49.0
Powered by blists - more mailing lists