From: "Gary Guo" <gary@garyguo.net>
To: "Daniel Almeida" <daniel.almeida@collabora.com>,
"Gary Guo" <gary@garyguo.net>
Cc: "Ivan Borovyk" <saref012@gmail.com>, <dakr@kernel.org>,
<ojeda@kernel.org>, <abdiel.janulgue@gmail.com>,
<robin.murphy@arm.com>, <a.hindborg@kernel.org>,
<boqun@kernel.org>, <bjorn3_gh@protonmail.com>,
<lossin@kernel.org>, <aliceryhl@google.com>, <tmgross@umich.edu>,
<tamird@kernel.org>, <acourbot@nvidia.com>, <work@onurozkan.dev>,
<driver-core@lists.linux.dev>, <rust-for-linux@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] samples: rust_dma: add missing newline in dev_info! call
Date: Wed, 25 Nov 2026 16:39:41 +0000 [thread overview]
Message-ID: <DN4FV0JM8LYR.VJWXQ4AYC1Z9@garyguo.net> (raw)
In-Reply-To: <6D2642C7-8293-4E9F-9DB4-3199A20B0CF2@collabora.com>
On Tue Nov 24, 2026 at 4:14 PM GMT, Daniel Almeida wrote:
>
>
>> 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.
I initially proposed requiring newline to be omitted, but people don't like it
because they might have habit of writing "\n" if they write a lot of C kernel
code.
On the other hand, people write a lot of Rust userspace code would have the
habit of not writing "\n" because that's how `log` and `tracing` library work.
So in that version I changed it to accept either and behave the same. The
newlines are stripped by printk anyway and gets turned into a non-continuable
marker and is not actually a newline, because printk keeps records as opposed to
plain texts.
Best,
Gary
prev parent reply other threads:[~2026-11-25 16:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 1:04 [PATCH] " 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
2026-11-25 16:39 ` Gary Guo [this message]
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=DN4FV0JM8LYR.VJWXQ4AYC1Z9@garyguo.net \
--to=gary@garyguo.net \
--cc=a.hindborg@kernel.org \
--cc=abdiel.janulgue@gmail.com \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=driver-core@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=robin.murphy@arm.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=saref012@gmail.com \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
/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
all inboxes | Powered by JetHome®