Rust for Linux List
 help / color / mirror / Atom feed
From: Mehmet Koseoglu <mehmet.mkoseoglu@gmail.com>
To: Miguel Ojeda <ojeda@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>,
	Alice Ryhl <aliceryhl@google.com>,
	Daniel Almeida <daniel.almeida@collabora.com>
Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	driver-core@lists.linux.dev,
	Mehmet Koseoglu <mehmet.mkoseoglu@gmail.com>
Subject: [PATCH v1 2/3] dma-mapping: rust: samples: add missing newline in rust_dma
Date: Fri, 28 Aug 2026 04:50:21 +0300	[thread overview]
Message-ID: <20260828015148.221737-3-mehmet.mkoseoglu@gmail.com> (raw)
In-Reply-To: <20260828015148.221737-1-mehmet.mkoseoglu@gmail.com>

The `dev_info!` call iterating over scatter-gather table entries in
`DmaSampleDriver::drop` is missing a trailing newline, causing the
printed message to not be properly line-terminated.

Add the missing `\n` to the format string.

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: Mehmet Koseoglu <mehmet.mkoseoglu@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 bd60034ded23..aa454e4841a7 100644
--- a/samples/rust/rust_dma.rs
+++ b/samples/rust/rust_dma.rs
@@ -125,7 +125,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.55.0


  parent reply	other threads:[~2026-08-28  1:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-28  1:50 [PATCH v1 0/3] rust: add missing newlines in printing calls Mehmet Koseoglu
2026-08-28  1:50 ` [PATCH v1 1/3] rust: samples: add missing newlines in rust_print_main Mehmet Koseoglu
2026-08-28  6:18   ` Miguel Ojeda
2026-08-28  1:50 ` Mehmet Koseoglu [this message]
2026-08-28  1:50 ` [PATCH v1 3/3] rust: io: register: add missing newline in doc example Mehmet Koseoglu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260828015148.221737-3-mehmet.mkoseoglu@gmail.com \
    --to=mehmet.mkoseoglu@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=driver-core@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox