From: Alice Ryhl <aliceryhl@google.com>
To: Alexandre Courbot <acourbot@nvidia.com>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Jens Axboe" <axboe@kernel.dk>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rust: str: make NullTerminatedFormatter public
Date: Tue, 24 Feb 2026 07:40:29 +0000 [thread overview]
Message-ID: <aZ1V7ckM97JvSZKt@google.com> (raw)
In-Reply-To: <20260224-nullterminatedformatter-v1-1-5bef7b9b3d4c@nvidia.com>
On Tue, Feb 24, 2026 at 11:25:34AM +0900, Alexandre Courbot wrote:
> If `CONFIG_BLOCK` is disabled, the following warnings are displayed
> during build:
>
> warning: struct `NullTerminatedFormatter` is never constructed
> --> ../rust/kernel/str.rs:667:19
> |
> 667 | pub(crate) struct NullTerminatedFormatter<'a> {
> | ^^^^^^^^^^^^^^^^^^^^^^^
> |
> = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
>
> warning: associated function `new` is never used
> --> ../rust/kernel/str.rs:673:19
> |
> 671 | impl<'a> NullTerminatedFormatter<'a> {
> | ------------------------------------ associated function in this implementation
> 672 | /// Create a new [`Self`] instance.
> 673 | pub(crate) fn new(buffer: &'a mut [u8]) -> Option<NullTerminatedFormatter<'a>> {
>
> Fix them by making `NullTerminatedFormatter` public, as it could be
> useful for drivers anyway.
>
> Fixes: cdde7a1951ff ("rust: str: introduce `NullTerminatedFormatter`")
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
next prev parent reply other threads:[~2026-02-24 7:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <EtyJ8MYDqiz1ox6T4ZRavP9CrRbItP-Amr9lr4bIMYdJq3DEPwSFGGLjwNCgqZs5qP630NK5VwyiJzOt37PAjQ==@protonmail.internalid>
2026-02-24 2:25 ` [PATCH] rust: str: make NullTerminatedFormatter public Alexandre Courbot
2026-02-24 7:40 ` Alice Ryhl [this message]
2026-02-24 11:33 ` Andreas Hindborg
2026-03-04 2:34 ` Miguel Ojeda
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=aZ1V7ckM97JvSZKt@google.com \
--to=aliceryhl@google.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=axboe@kernel.dk \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.