[PATCH V2 05/11] soc: ti: knav_qmss: Use %pe to print PTR_ERR()
Nishanth Menon
nm at ti.com
Tue May 12 10:06:17 PDT 2026
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.
Signed-off-by: Nishanth Menon <nm at ti.com>
---
Changes since V1:
- None.
V1: https://lore.kernel.org/all/20260508153211.3688277-6-nm@ti.com/
drivers/soc/ti/knav_qmss_queue.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c
index c3f85052002b..50072e9dea37 100644
--- a/drivers/soc/ti/knav_qmss_queue.c
+++ b/drivers/soc/ti/knav_qmss_queue.c
@@ -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;
}
--
2.47.0
More information about the linux-arm-kernel
mailing list