On Mon Oct 13 14:14:44 2025 +0000, Ricardo Ribalda wrote:
> 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/adv7842.c:3470:16-23: WARNING: Consider using %pe to print PTR_ERR()
>
> Signed-off-by: Ricardo Ribalda <[email protected]>
> Acked-by: Sakari Ailus <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>
Patch committed.
Thanks,
Hans Verkuil
drivers/media/i2c/adv7842.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c
index 21c3d3682e0b..ea6966c0605e 100644
--- a/drivers/media/i2c/adv7842.c
+++ b/drivers/media/i2c/adv7842.c
@@ -3469,8 +3469,8 @@ static struct i2c_client *adv7842_dummy_client(struct
v4l2_subdev *sd, const cha
cp = i2c_new_dummy_device(client->adapter, io_read(sd, io_reg) >> 1);
if (IS_ERR(cp)) {
- v4l2_err(sd, "register %s on i2c addr 0x%x failed with %ld\n",
- desc, addr, PTR_ERR(cp));
+ v4l2_err(sd, "register %s on i2c addr 0x%x failed with %pe\n",
+ desc, addr, cp);
cp = NULL;
}
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]