diff options
| author | Andreas Hindborg <a.hindborg@kernel.org> | 2026-04-27 10:11:35 +0200 |
|---|---|---|
| committer | Sami Tolvanen <samitolvanen@google.com> | 2026-05-27 00:20:39 +0000 |
| commit | ac2f40107cf1296955c867dc31b1a1eceb8ec569 (patch) | |
| tree | ac7ea0bea6d8dbdfd05a4d878c35876a957712bc /rust/kernel | |
| parent | 04e17ca3f77e1722a5db068fbcd7b93c51656013 (diff) | |
rust: module_param: use `pr_warn_once!` for null pointer warning
Replace `pr_warn!` and the accompanying TODO with `pr_warn_once!`, now that
the macro is available.
[ Note: Adarsh Das independently authored an identical patch on the
rust-for-linux list, but it missed the modules tree. ]
Suggested-by: Adarsh Das <adarshdas950@gmail.com>
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Reviewed-by: Aaron Tomlin <atomlin@atomlin.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Daniel Gomez <da.gomez@samsung.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Diffstat (limited to 'rust/kernel')
| -rw-r--r-- | rust/kernel/module_param.rs | 3 |
1 files changed, 1 insertions, 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 @@ where // 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(); } |
