* Re: [PATCH] rust: str: make NullTerminatedFormatter public
2026-02-24 2:25 ` [PATCH] rust: str: make NullTerminatedFormatter public Alexandre Courbot
@ 2026-02-24 7:40 ` Alice Ryhl
2026-02-24 11:33 ` Andreas Hindborg
2026-03-04 2:34 ` Miguel Ojeda
2 siblings, 0 replies; 4+ messages in thread
From: Alice Ryhl @ 2026-02-24 7:40 UTC (permalink / raw)
To: Alexandre Courbot
Cc: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Trevor Gross, Danilo Krummrich,
Jens Axboe, Daniel Almeida, rust-for-linux, linux-kernel
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>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] rust: str: make NullTerminatedFormatter public
2026-02-24 2:25 ` [PATCH] rust: str: make NullTerminatedFormatter public Alexandre Courbot
2026-02-24 7:40 ` Alice Ryhl
@ 2026-02-24 11:33 ` Andreas Hindborg
2026-03-04 2:34 ` Miguel Ojeda
2 siblings, 0 replies; 4+ messages in thread
From: Andreas Hindborg @ 2026-02-24 11:33 UTC (permalink / raw)
To: Alexandre Courbot, Miguel Ojeda, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross,
Danilo Krummrich, Jens Axboe, Daniel Almeida
Cc: rust-for-linux, linux-kernel, Alexandre Courbot
"Alexandre Courbot" <acourbot@nvidia.com> writes:
> 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: Andreas Hindborg <a.hindborg@kernel.org>
Best regards,
Andreas Hindborg
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] rust: str: make NullTerminatedFormatter public
2026-02-24 2:25 ` [PATCH] rust: str: make NullTerminatedFormatter public Alexandre Courbot
2026-02-24 7:40 ` Alice Ryhl
2026-02-24 11:33 ` Andreas Hindborg
@ 2026-03-04 2:34 ` Miguel Ojeda
2 siblings, 0 replies; 4+ messages in thread
From: Miguel Ojeda @ 2026-03-04 2:34 UTC (permalink / raw)
To: Alexandre Courbot
Cc: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, Jens Axboe, Daniel Almeida, rust-for-linux,
linux-kernel
On Tue, Feb 24, 2026 at 3:25 AM Alexandre Courbot <acourbot@nvidia.com> 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>
Applied to `rust-fixes` -- thanks everyone!
Also Cc: stable@vger.kernel.org
Cheers,
Miguel
^ permalink raw reply [flat|nested] 4+ messages in thread