Tamir Duberstein
2025-Jul-20 23:04 UTC
[PATCH 1/6] rust: kernel: remove `fmt!`, fix clippy::uninlined-format-args
On Fri, Jul 4, 2025 at 4:16?PM Tamir Duberstein <tamird at gmail.com> wrote:> > Rather than export a macro that delegates to `core::format_args`, simply > re-export `core::format_args` as `fmt` from the prelude. This exposes > clippy warnings which were previously obscured by this macro, such as: > > warning: variables can be used directly in the `format!` string > --> ../drivers/cpufreq/rcpufreq_dt.rs:21:43 > | > 21 | let prop_name = CString::try_from_fmt(fmt!("{}-supply", name)).ok()?; > | ^^^^^^^^^^^^^^^^^^^^^^^ > | > = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args > = note: `-W clippy::uninlined-format-args` implied by `-W clippy::all` > = help: to override `-W clippy::all` add `#[allow(clippy::uninlined_format_args)]` > help: change this to > | > 21 - let prop_name = CString::try_from_fmt(fmt!("{}-supply", name)).ok()?; > 21 + let prop_name = CString::try_from_fmt(fmt!("{name}-supply")).ok()?; > | > > Thus fix them in the same commit. This could possibly be fixed in two > stages, but the diff is small enough (outside of kernel/str.rs) that I > hope it can taken in a single commit.Just noticed a tiny typo here: it should say "can *be* taken". Miguel, if you can fix that on apply, please do - but if not, no worries.
Miguel Ojeda
2025-Jul-20 23:17 UTC
[PATCH 1/6] rust: kernel: remove `fmt!`, fix clippy::uninlined-format-args
On Mon, Jul 21, 2025 at 1:04?AM Tamir Duberstein <tamird at gmail.com> wrote:> > Just noticed a tiny typo here: it should say "can *be* taken". > > Miguel, if you can fix that on apply, please do - but if not, no worries.Done! (We could also have removed that sentence too, since it sounds a bit like something one would write after the `---` line). Cheers, Miguel
Tamir Duberstein
2025-Jul-20 23:19 UTC
[PATCH 1/6] rust: kernel: remove `fmt!`, fix clippy::uninlined-format-args
On Sun, Jul 20, 2025 at 7:17?PM Miguel Ojeda <miguel.ojeda.sandonis at gmail.com> wrote:> > On Mon, Jul 21, 2025 at 1:04?AM Tamir Duberstein <tamird at gmail.com> wrote: > > > > Just noticed a tiny typo here: it should say "can *be* taken". > > > > Miguel, if you can fix that on apply, please do - but if not, no worries. > > Done! (We could also have removed that sentence too, since it sounds a > bit like something one would write after the `---` line).Yeah, agreed. Removing it would be fine by me as well!