Skip to contentSkip to conversation

rust: kernel: module_param: replace pr_warn with pr_warn_once

PATCH In review Xiaobo Liu 2 participants 2 messages May 18

Subsystems (2)
lore
Share & tools
lore

Xiaobo Liu

author
#0 lore raw

PATCH 1/1 rust: kernel: module_param: replace pr_warn with pr_warn_once

---
 rust/kernel/module_param.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
rust/kernel/module_param.rs +1 -2
index 6a8a7a875..fedb709fa 100644
@@ -62,8 +62,8 @@ 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();
     }
 
Signature · 1 line
2.34.1
reviewer
#1 lore raw
Quoted 2 lines · On Mon, 18 May 2026 18:47:35 +0800 Xiaobo Liu <[email protected]> wrote:

---

You need to write description for the change.

Onur

Quoted 20 lines
 rust/kernel/module_param.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
rust/kernel/module_param.rs +1 -2
index 6a8a7a875..fedb709fa 100644
@@ -62,8 +62,8 @@ 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();
     }
 
Signature · 1 line
2.34.1