blob: 7813199fe6f8c2cebd53f4028b9f8cbf4ede9deb [file] [log] [blame]
From: zhang jiao <zhangjiao2@cmss.chinamobile.com>
Subject: fs/proc/base.c: fix the wrong format specifier
Date: Wed, 3 Sep 2025 16:39:47 +0800
Use '%d' instead of '%u' for int.
Link: https://lkml.kernel.org/r/20250903083948.2536-1-zhangjiao2@cmss.chinamobile.com
Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Thomas Gleinxer <tglx@linutronix.de>
Cc: xu xin <xu.xin16@zte.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/proc/base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/proc/base.c~fs-proc-basec-fix-the-wrong-format-specifier
+++ a/fs/proc/base.c
@@ -3945,7 +3945,7 @@ static int proc_task_readdir(struct file
tid = task_pid_nr_ns(task, ns);
if (!tid)
continue; /* The task has just exited. */
- len = snprintf(name, sizeof(name), "%u", tid);
+ len = snprintf(name, sizeof(name), "%d", tid);
if (!proc_fill_cache(file, ctx, name, len,
proc_task_instantiate, task, NULL)) {
/* returning this tgid failed, save it as the first
_