rust: module_param: use pr_warn_once! for null pointer warning
Subsystems (2)
PATCH 1/1 rust: module_param: use pr_warn_once! for null pointer warning
This resolves the existing TODO that asked for pr_warn_once! once it became available.
Signed-off-by Maurice Hieronymus <[email protected]>
--- rust/kernel/module_param.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
rust/kernel/module_param.rs +1 -2
@@ -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: 838a0871cb3cf5988560d17afaaf57592bdb486b
change-id: 20260606-module-param-pr-warn-once-ed2f548ea741
Best regards,
Signature · 1 line
Maurice Hieronymus <[email protected]>
Quoted 5 lines · Maurice Hieronymus
This resolves the existing TODO that asked for
pr_warn_once! once it became available.Signed-off-by Maurice Hieronymus <[email protected]>
Thanks for the patch!
This was already sent and applied, please see commit:
ac2f40107cf1 ("rust: module_param: use pr_warn_once! for null
pointer warning")
in linux-next.
Cheers,
Miguel