Skip to contentSkip to conversation

rust: module_param: add missing newline to pr_warn

PATCH Applied Kenny Glowner 3 participants 6 messages May 21 – May 29 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rust: module_param: add missing newline to pr_warn

Add a trailing newline ('\n') to the pr_warn! call in set_param to ensure the kernel ring buffer flushes the message correctly and prevents log line smearing.

---
 rust/kernel/module_param.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
rust/kernel/module_param.rs +1 -1
index 6a8a7a875643..fa26089be2e0 100644
@@ -63,7 +63,7 @@ pub trait ModuleParam: Sized + Copy {
     // 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!("Null pointer passed to `module_param::set_param`\n");
         return EINVAL.to_errno();
     }
 
Signature · 1 line
2.54.0
#1 lore raw
Quoted 4 lines · Kenny Glowner

Add a trailing newline ('\n') to the pr_warn! call in set_param to ensure the kernel ring buffer flushes the message correctly and prevents log line smearing.

Did you see log smearing? IIRC this changed with the buffer rework -- it is still the convention we expect, though, so the diff contents are good.

Quoted 3 lines

Andreas, Sami, Daniel, Luis, Petr: will this one go through modules too? Otherwise, please let me know and I can take it.

(Trivial conflict with the pr_warn_once! one applied yesterday.)

Thanks!

Cheers,
Miguel

#5 lore raw
In reply to Kenny Glowner
Quoted 4 lines · Kenny Glowner

By the way, we put tags together as one -- also please feel free to add me as suggester like the issue says (part of the reason behind these "good first issues" is to show you how these tags usually work), e.g.

Cheers,
Miguel

maintainer
#2 lore raw
In reply to Miguel Ojeda
Quoted 12 lines · Miguel Ojeda
Quoted 4 lines · Kenny Glowner

Add a trailing newline ('\n') to the pr_warn! call in set_param to ensure the kernel ring buffer flushes the message correctly and prevents log line smearing.

Did you see log smearing? IIRC this changed with the buffer rework -- it is still the convention we expect, though, so the diff contents are good.

Quoted 6 lines
Quoted 3 lines

Andreas, Sami, Daniel, Luis, Petr: will this one go through modules too? Otherwise, please let me know and I can take it.

Yes, I'll take this one through modules too. Thanks, Miguel.

Sami

maintainer Applied
#6 lore raw
In reply to Kenny Glowner
Quoted 4 lines · Kenny Glowner

Add a trailing newline ('\n') to the pr_warn! call in set_param to ensure the kernel ring buffer flushes the message correctly and prevents log line smearing.

Applied to modules-next, thanks!

[1/1] rust: module_param: add missing newline to pr_warn_once

      commit: ae12a56ba16adcb8a06d5b3b91d4f82a092e8de3

Best regards,

Sami

#4 lore raw
In reply to a message not in the archive
Quoted 2 lines · Kenny Glowner

I hope I submitted everything correctly? I am trying to get used to it so I can provide better assistance on more mainstream issues. That's why I started with the most minor issue I could find. I appreciate all of the feedback.

Yes, it looks fine, thanks! :)

However, in general, please try to reply to the feedback, e.g. I asked a question about the commit message.

Cheers,
Miguel