* [PATCH] samples: rust_dma: add missing newline in dev_info! call
@ 2026-11-23 1:04 Ivan Borovyk
2026-11-23 23:06 ` [PATCH v2] " Ivan Borovyk
0 siblings, 1 reply; 5+ messages in thread
From: Ivan Borovyk @ 2026-11-23 1:04 UTC (permalink / raw)
To: dakr, ojeda
Cc: abdiel.janulgue, daniel.almeida, robin.murphy, a.hindborg, boqun,
gary, bjorn3_gh, lossin, aliceryhl, tmgross, tamird, acourbot,
work, driver-core, rust-for-linux, linux-kernel, Ivan Borovyk
The dev_info! call in the probe function lacks a trailing newline in
its format string, which makes the message run together with the next
line in the kernel log. Add the missing newline.
Suggested-by: Miguel Ojeda <ojeda@kernel.org>
Link: https://github.com/Rust-for-Linux/linux/issues/1139
Signed-off-by: Ivan Borovyk <saref012@gmail.com>
---
samples/rust/rust_dma.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/rust/rust_dma.rs b/samples/rust/rust_dma.rs
index ffb693544673..b4b161896517 100644
--- a/samples/rust/rust_dma.rs
+++ b/samples/rust/rust_dma.rs
@@ -129,7 +129,7 @@ fn drop(self: Pin<&mut Self>) {
for (i, entry) in self.sgt.iter().enumerate() {
dev_info!(
self.pdev,
- "Entry[{}]: DMA address: {:#x}",
+ "Entry[{}]: DMA address: {:#x}\n",
i,
entry.dma_address(),
);
--
2.53.0
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH v2] samples: rust_dma: add missing newline in dev_info! call
2026-11-23 1:04 [PATCH] samples: rust_dma: add missing newline in dev_info! call Ivan Borovyk
@ 2026-11-23 23:06 ` Ivan Borovyk
2026-11-24 6:21 ` Alexandre Courbot
2026-11-24 14:31 ` Gary Guo
0 siblings, 2 replies; 5+ messages in thread
From: Ivan Borovyk @ 2026-11-23 23:06 UTC (permalink / raw)
To: dakr, ojeda
Cc: abdiel.janulgue, daniel.almeida, robin.murphy, a.hindborg, boqun,
gary, bjorn3_gh, lossin, aliceryhl, tmgross, tamird, acourbot,
work, driver-core, rust-for-linux, linux-kernel, Ivan Borovyk
The dev_info! call in PinnedDrop::drop() lacks a trailing newline in its
format string, unlike the other dev_info!() calls in the file. End the
format string with '\n' for consistency with the dev_*!() and pr_*!()
macro conventions.
Fixes: 5444799d701c ("samples: rust: dma: add sample code for SGTable")
Suggested-by: Miguel Ojeda <ojeda@kernel.org>
Link: https://github.com/Rust-for-Linux/linux/issues/1139
Signed-off-by: Ivan Borovyk <saref012@gmail.com>
---
Changes in v2:
- Correct the commit message: the modified call is in PinnedDrop::drop(),
not in probe()
- Reword the rationale: consistency with the pr_*!()/dev_*!() macro
conventions rather than log concatenation
- Add Fixes: tag
samples/rust/rust_dma.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/rust/rust_dma.rs b/samples/rust/rust_dma.rs
index ffb693544673..b4b161896517 100644
--- a/samples/rust/rust_dma.rs
+++ b/samples/rust/rust_dma.rs
@@ -129,7 +129,7 @@ fn drop(self: Pin<&mut Self>) {
for (i, entry) in self.sgt.iter().enumerate() {
dev_info!(
self.pdev,
- "Entry[{}]: DMA address: {:#x}",
+ "Entry[{}]: DMA address: {:#x}\n",
i,
entry.dma_address(),
);
--
2.53.0
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v2] samples: rust_dma: add missing newline in dev_info! call
2026-11-23 23:06 ` [PATCH v2] " Ivan Borovyk
@ 2026-11-24 6:21 ` Alexandre Courbot
2026-11-24 14:31 ` Gary Guo
1 sibling, 0 replies; 5+ messages in thread
From: Alexandre Courbot @ 2026-11-24 6:21 UTC (permalink / raw)
To: Ivan Borovyk
Cc: dakr, ojeda, abdiel.janulgue, daniel.almeida, robin.murphy,
a.hindborg, boqun, gary, bjorn3_gh, lossin, aliceryhl, tmgross,
tamird, work, driver-core, rust-for-linux, linux-kernel
On Tue Nov 24, 2026 at 8:06 AM JST, Ivan Borovyk wrote:
> The dev_info! call in PinnedDrop::drop() lacks a trailing newline in its
> format string, unlike the other dev_info!() calls in the file. End the
> format string with '\n' for consistency with the dev_*!() and pr_*!()
> macro conventions.
>
> Fixes: 5444799d701c ("samples: rust: dma: add sample code for SGTable")
> Suggested-by: Miguel Ojeda <ojeda@kernel.org>
> Link: https://github.com/Rust-for-Linux/linux/issues/1139
> Signed-off-by: Ivan Borovyk <saref012@gmail.com>
FWIW,
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v2] samples: rust_dma: add missing newline in dev_info! call
2026-11-23 23:06 ` [PATCH v2] " Ivan Borovyk
2026-11-24 6:21 ` Alexandre Courbot
@ 2026-11-24 14:31 ` Gary Guo
2026-11-24 16:14 ` Daniel Almeida
1 sibling, 1 reply; 5+ messages in thread
From: Gary Guo @ 2026-11-24 14:31 UTC (permalink / raw)
To: Ivan Borovyk, dakr, ojeda
Cc: abdiel.janulgue, daniel.almeida, robin.murphy, a.hindborg, boqun,
gary, bjorn3_gh, lossin, aliceryhl, tmgross, tamird, acourbot,
work, driver-core, rust-for-linux, linux-kernel
On Mon Nov 23, 2026 at 11:06 PM GMT, Ivan Borovyk wrote:
> The dev_info! call in PinnedDrop::drop() lacks a trailing newline in its
> format string, unlike the other dev_info!() calls in the file. End the
> format string with '\n' for consistency with the dev_*!() and pr_*!()
> macro conventions.
>
> Fixes: 5444799d701c ("samples: rust: dma: add sample code for SGTable")
> Suggested-by: Miguel Ojeda <ojeda@kernel.org>
> Link: https://github.com/Rust-for-Linux/linux/issues/1139
> Signed-off-by: Ivan Borovyk <saref012@gmail.com>
FWIW I have a series that would make trailing newline optional (although I've
not got any feedbacks about whether people would like that):
https://lore.kernel.org/rust-for-linux/20260728-printk-v1-5-855606634d70@garyguo.net/
Best,
Gary
> ---
> Changes in v2:
> - Correct the commit message: the modified call is in PinnedDrop::drop(),
> not in probe()
> - Reword the rationale: consistency with the pr_*!()/dev_*!() macro
> conventions rather than log concatenation
> - Add Fixes: tag
>
> samples/rust/rust_dma.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/samples/rust/rust_dma.rs b/samples/rust/rust_dma.rs
> index ffb693544673..b4b161896517 100644
> --- a/samples/rust/rust_dma.rs
> +++ b/samples/rust/rust_dma.rs
> @@ -129,7 +129,7 @@ fn drop(self: Pin<&mut Self>) {
> for (i, entry) in self.sgt.iter().enumerate() {
> dev_info!(
> self.pdev,
> - "Entry[{}]: DMA address: {:#x}",
> + "Entry[{}]: DMA address: {:#x}\n",
> i,
> entry.dma_address(),
> );
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v2] samples: rust_dma: add missing newline in dev_info! call
2026-11-24 14:31 ` Gary Guo
@ 2026-11-24 16:14 ` Daniel Almeida
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Almeida @ 2026-11-24 16:14 UTC (permalink / raw)
To: Gary Guo
Cc: Ivan Borovyk, dakr, ojeda, abdiel.janulgue, robin.murphy,
a.hindborg, boqun, bjorn3_gh, lossin, aliceryhl, tmgross, tamird,
acourbot, work, driver-core, rust-for-linux, linux-kernel
> On 24 Nov 2026, at 11:31, Gary Guo <gary@garyguo.net> wrote:
>
> On Mon Nov 23, 2026 at 11:06 PM GMT, Ivan Borovyk wrote:
>> The dev_info! call in PinnedDrop::drop() lacks a trailing newline in its
>> format string, unlike the other dev_info!() calls in the file. End the
>> format string with '\n' for consistency with the dev_*!() and pr_*!()
>> macro conventions.
>>
>> Fixes: 5444799d701c ("samples: rust: dma: add sample code for SGTable")
>> Suggested-by: Miguel Ojeda <ojeda@kernel.org>
>> Link: https://github.com/Rust-for-Linux/linux/issues/1139
>> Signed-off-by: Ivan Borovyk <saref012@gmail.com>
>
> FWIW I have a series that would make trailing newline optional (although I've
> not got any feedbacks about whether people would like that):
>
> https://lore.kernel.org/rust-for-linux/20260728-printk-v1-5-855606634d70@garyguo.net/
>
> Best,
> Gary
IIRC, there were some discussions about this, where people asked the Rust side
to not deviate from the C side in this regard. It’s been a while though, so take it
with a grain of salt.
— Daniel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-24 16:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 1:04 [PATCH] samples: rust_dma: add missing newline in dev_info! call Ivan Borovyk
2026-11-23 23:06 ` [PATCH v2] " Ivan Borovyk
2026-11-24 6:21 ` Alexandre Courbot
2026-11-24 14:31 ` Gary Guo
2026-11-24 16:14 ` Daniel Almeida
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®