]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
soc: ti: knav_qmss: Use %pe to print PTR_ERR()
authorNishanth Menon <nm@ti.com>
Tue, 12 May 2026 17:06:17 +0000 (12:06 -0500)
committerNishanth Menon <nm@ti.com>
Fri, 22 May 2026 15:55:55 +0000 (10:55 -0500)
Coccinelle (scripts/coccinelle/misc/ptr_err_to_pe.cocci) flags the
dev_err() call in knav_pool_create():

  knav_qmss_queue.c:789:9-16: WARNING: Consider using %pe to print
  PTR_ERR()

Replace the %ld / PTR_ERR() pair with %pe and pass the error pointer
directly to also print the symbolic error name.

Reviewed-by: Sai Sree Kartheek Adivi <s-adivi@ti.com>
Reviewed-by: Hari Prasath Gujulan Elango <gehariprasath@ti.com>
Link: https://patch.msgid.link/20260512170623.3174416-6-nm@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
drivers/soc/ti/knav_qmss_queue.c

index 7e3c0555425427dd875b3b0f05432c3ec4a345a8..8af88a143159e57bc15742e9e80e19f14dfaec86 100644 (file)
@@ -785,8 +785,8 @@ void *knav_pool_create(const char *name,
        pool->queue = knav_queue_open(name, KNAV_QUEUE_GP, 0);
        if (IS_ERR(pool->queue)) {
                dev_err(knav_qdev->dev,
-                       "failed to open queue for pool(%s), error %ld\n",
-                       name, PTR_ERR(pool->queue));
+                       "failed to open queue for pool(%s), error %pe\n",
+                       name, pool->queue);
                ret = PTR_ERR(pool->queue);
                goto err;
        }