mm/vmscan.c | 4 ++-- mm/zswap.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
Convert error logging throughout the MM subsystem to use
the %pe format specifier instead of PTR_ERR() with integer
format specifiers.
Found by:
----
./zswap.c:753:20-27: WARNING: Consider using %pe to print PTR_ERR()
./vmscan.c:7504:12-19: WARNING: Consider using %pe to print PTR_ERR()
---
Signed-off-by: zenghongling <zenghongling@kylinos.cn>
---
mm/vmscan.c | 4 ++--
mm/zswap.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index b2fc8b626d3d..29ed0b304b5c 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -7500,8 +7500,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 {
diff --git a/mm/zswap.c b/mm/zswap.c
index c1af782e54ec..c35604db32ad 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -749,8 +749,8 @@ static int zswap_cpu_comp_prepare(unsigned int cpu, struct hlist_node *node)
acomp = crypto_alloc_acomp_node(pool->tfm_name, 0, 0, cpu_to_node(cpu));
if (IS_ERR(acomp)) {
- pr_err("could not alloc crypto acomp %s : %ld\n",
- pool->tfm_name, PTR_ERR(acomp));
+ pr_err("could not alloc crypto acomp %s : %pe\n",
+ pool->tfm_name, acomp);
ret = PTR_ERR(acomp);
goto fail;
}
--
2.25.1
On Wed, Jan 21, 2026 at 11:48:17AM +0800, zenghongling wrote: > Convert error logging throughout the MM subsystem to use > the %pe format specifier instead of PTR_ERR() with integer > format specifiers. > > Found by: > ---- > ./zswap.c:753:20-27: WARNING: Consider using %pe to print PTR_ERR() > ./vmscan.c:7504:12-19: WARNING: Consider using %pe to print PTR_ERR() Please stop.
© 2016 - 2026 Red Hat, Inc.