Thread (47 messages) 47 messages, 10 authors, 2025-10-17

[PATCH 20/32] media: i2c: st-mipid02: Use %pe format specifier

From: Ricardo Ribalda <hidden>
Date: 2025-10-13 14:15:06
Also in: imx, linux-media, linux-mediatek, linux-renesas-soc, linux-rockchip, linux-samsung-soc, linux-staging, lkml
Subsystem: media input infrastructure (v4l/dvb), st mipid02 csi-2 to parallel bridge driver, the rest · Maintainers: Mauro Carvalho Chehab, Benjamin Mugnier, Sylvain Petinot, Linus Torvalds

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/st-mipid02.c:751:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <redacted>
---
 drivers/media/i2c/st-mipid02.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c
index 41ae25b0911f02517f137d6b5307d13154266e07..4675181af5fb00df837c8b796fc32d50e077a480 100644
--- a/drivers/media/i2c/st-mipid02.c
+++ b/drivers/media/i2c/st-mipid02.c
@@ -747,8 +747,8 @@ static int mipid02_parse_rx_ep(struct mipid02_dev *bridge)
 	of_node_put(ep_node);
 
 	if (IS_ERR(asd)) {
-		dev_err(&client->dev, "fail to register asd to notifier %ld",
-			PTR_ERR(asd));
+		dev_err(&client->dev, "fail to register asd to notifier %pe",
+			asd);
 		return PTR_ERR(asd);
 	}
 	bridge->notifier.ops = &mipid02_notifier_ops;
-- 
2.51.0.760.g7b8bcc2412-goog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help