mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 01:32:21 +02:00
rust: module_param: add missing newline to pr_warn_once
Add a trailing newline ('\n') to the pr_warn_once! call in set_param to
ensure the kernel ring buffer flushes the message correctly and
prevents log line smearing.
Signed-off-by: Kenny Glowner <SisyphusCode0311@gmail.com>
Suggested-by: Miguel Ojeda <ojeda@kernel.org>
Link: https://github.com/Rust-for-Linux/linux/issues/1139
[Sami: Updated the commit message as we use pr_warn_once now.]
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
This commit is contained in:
parent
786d2d8441
commit
36d6b929bb
|
|
@ -62,7 +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() {
|
||||
crate::pr_warn_once!("Null pointer passed to `module_param::set_param`");
|
||||
crate::pr_warn_once!("Null pointer passed to `module_param::set_param`\n");
|
||||
return EINVAL.to_errno();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user