rust: module_param: add missing newline to pr_warn
Subsystems (2)
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
@@ -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
Quoted 4 lines · Kenny Glowner
Add a trailing newline ('\n') to the
pr_warn! call inset_paramto 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
Signed-off-by Kenny Glowner <[email protected]>
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
Quoted 4 lines · Kenny Glowner
Signed-off-by Kenny Glowner <[email protected]>
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
Sami Tolvanen
maintainerQuoted 12 lines · Miguel Ojeda
Quoted 4 lines · Kenny Glowner
Add a trailing newline ('\n') to the
pr_warn! call inset_paramto 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
Signed-off-by Kenny Glowner <[email protected]>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
Quoted 4 lines · Kenny Glowner
Add a trailing newline ('\n') to the
pr_warn! call inset_paramto 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
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