Linux Modules
 help / color / mirror / Atom feed
* [PATCH] rust: module_param: add missing newline to pr_warn
@ 2026-05-21 16:14 Kenny Glowner
  0 siblings, 0 replies; only message in thread
From: Kenny Glowner @ 2026-05-21 16:14 UTC (permalink / raw)
  To: Luis Chamberlain, Petr Pavlu, Daniel Gomez, Sami Tolvanen,
	Miguel Ojeda
  Cc: linux-modules, rust-for-linux, linux-kernel, 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.

Link: https://github.com/Rust-for-Linux/linux/issues/1139

Signed-off-by: Kenny Glowner <SisyphusCode0311@gmail.com>
---
 rust/kernel/module_param.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/kernel/module_param.rs b/rust/kernel/module_param.rs
index 6a8a7a875643..fa26089be2e0 100644
--- a/rust/kernel/module_param.rs
+++ b/rust/kernel/module_param.rs
@@ -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();
     }
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-21 16:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-21 16:14 [PATCH] rust: module_param: add missing newline to pr_warn Kenny Glowner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox