Thread (39 messages) 39 messages, 2 authors, 16h ago
HOTtoday

[PATCH v7 01/29] params: fix a pr_debug(" %p ") use - already in MM-*

From: Jim Cromie <jim.cromie@gmail.com>
Date: 2026-07-21 20:57:17
Also in: dri-devel, linux-arch, linux-doc, linux-kselftest, lkml, stable
Subsystem: the rest · Maintainer: Linus Torvalds

NB: this is already in mm, but I need it in this patchset because
kernel/params is subjected to testing by the selftest script, and the
test depends upon its stability.

kernel/params.c has a pr_debug() which prints the address of a
parameter setter function, this is not legitimately useful.  Since the
value is known and useful to the user, print that instead.

Cc: stable@vger.kernel.org
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
---
 kernel/params.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/params.c b/kernel/params.c
index a668863a4bb6..5c8a05921e28 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -136,8 +136,8 @@ static int parse_one(char *param,
 			if (!val &&
 			    !(params[i].ops->flags & KERNEL_PARAM_OPS_FL_NOARG))
 				return -EINVAL;
-			pr_debug("handling %s with %p\n", param,
-				params[i].ops->set);
+			pr_debug("handling %s with value '%s'\n", param,
+				val ? val : "no-arg");
 			kernel_param_lock(params[i].mod);
 			if (param_check_unsafe(&params[i]))
 				err = params[i].ops->set(val, &params[i]);
-- 
2.55.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help