On Mon, Apr 27, 2026 at 10:11:35AM +0200, Andreas Hindborg wrote: > Replace `pr_warn!` and the accompanying TODO with `pr_warn_once!`, now that > the macro is available. > > Signed-off-by: Andreas Hindborg <[email protected]> > --- > rust/kernel/module_param.rs | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/rust/kernel/module_param.rs b/rust/kernel/module_param.rs > index 6a8a7a875643..dd6d663a0a3c 100644 > --- a/rust/kernel/module_param.rs > +++ b/rust/kernel/module_param.rs > @@ -62,8 +62,7 @@ pub trait ModuleParam: Sized + Copy { > // NOTE: If we start supporting arguments without values, val _is_ > allowed > // to be null here. > if val.is_null() { > - // TODO: Use pr_warn_once available. > - crate::pr_warn!("Null pointer passed to `module_param::set_param`"); > + crate::pr_warn_once!("Null pointer passed to > `module_param::set_param`"); > return EINVAL.to_errno(); > } > > > --- > base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731 > change-id: 20260427-params-pr-once-481c03df3e2a > > Best regards, > -- > Andreas Hindborg <[email protected]>
LGTM. The rust macro was available since v6.19-rc6-60-g46c40f938f5f. Reviewed-by: Aaron Tomlin <[email protected]> -- Aaron Tomlin
signature.asc
Description: PGP signature

