summaryrefslogtreecommitdiff
path: root/Documentation/console/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2026-02-24 11:25:34 +0900
committerMiguel Ojeda <ojeda@kernel.org>2026-03-04 02:03:31 +0100
commit3ac88a9948792b092a4b11323e2abd1ecbe0cc68 (patch)
tree03fc26e90cc7dad8b52cdc3d9553d313eba82e8f /Documentation/console/git@git.tavy.me:linux.git
parent11439c4635edd669ae435eec308f4ab8a0804808 (diff)
rust: str: make NullTerminatedFormatter public
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> Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20260224-nullterminatedformatter-v1-1-5bef7b9b3d4c@nvidia.com Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'Documentation/console/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions