[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <80a6643657a60e75ddf48b4869b3e7fdc101f855.1770230135.git.chandna.sahil@gmail.com>
Date: Thu, 5 Feb 2026 00:24:07 +0530
From: Sahil Chandna <chandna.sahil@...il.com>
To: akpm@...ux-foundation.org,
hannes@...xchg.org,
yosry.ahmed@...ux.dev,
nphamcs@...il.com,
david@...nel.org,
sj@...nel.org,
mhocko@...nel.org,
zhengqi.arch@...edance.com,
shakeel.butt@...ux.dev,
lorenzo.stoakes@...cle.com,
axelrasmussen@...gle.com,
yuanchu@...gle.com,
weixugc@...gle.com,
chengming.zhou@...ux.dev,
linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Cc: Sahil Chandna <chandna.sahil@...il.com>
Subject: [PATCH v5 1/2] mm/vmscan: use %pe to print error pointers
Use the %pe printk format specifier to report error pointers directly
instead of printing PTR_ERR() as a long value. This improves clarity,
produces more readable error messages.
This instance was flagged by the Coccinelle script
(misc/ptr_err_to_pe.cocci) as an opportunity to adopt %pe.
Found by: make coccicheck MODE=report M=mm/
No functional change intended
Acked-by: David Hildenbrand (Red Hat) <david@...nel.org>
Reviewed-by: SeongJae Park <sj@...nel.org>
Signed-off-by: Sahil Chandna <chandna.sahil@...il.com>
---
changes since v2:
- Add Acked-by tag
link to v2: https://lore.kernel.org/all/64e15c6b2ce86d7824f54e9e001b6f5b44af48b8.1763796152.git.chandna.sahil@gmail.com/
link to v3: https://lore.kernel.org/all/db049e564cafcb0913bee930d6a577ea43044f5b.1764177933.git.chandna.sahil@gmail.com/
link to v4: https://lore.kernel.org/all/2c842a64fddeb0fe0cac087783aaedd97edc3191.1764312627.git.chandna.sahil@gmail.com/
---
mm/vmscan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 01d3364fe506..44e4fcd6463c 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -7479,8 +7479,8 @@ void __meminit kswapd_run(int nid)
pgdat->kswapd = kthread_create_on_node(kswapd, pgdat, nid, "kswapd%d", nid);
if (IS_ERR(pgdat->kswapd)) {
/* failure at boot is fatal */
- pr_err("Failed to start kswapd on node %d,ret=%ld\n",
- nid, PTR_ERR(pgdat->kswapd));
+ pr_err("Failed to start kswapd on node %d, ret=%pe\n",
+ nid, pgdat->kswapd);
BUG_ON(system_state < SYSTEM_RUNNING);
pgdat->kswapd = NULL;
} else {
--
2.50.1
Powered by blists - more mailing lists