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

Re: [PATCH 01/32] Input: cyttsp5 - Use %pe format specifier

From: Ricardo Ribalda <hidden>
Date: 2025-10-13 16:17:49
Also in: imx, linux-media, linux-mediatek, linux-renesas-soc, linux-rockchip, linux-samsung-soc, linux-staging, lkml

Hi Frank

On Mon, 13 Oct 2025 at 17:36, Frank Li [off-list ref] wrote:
On Mon, Oct 13, 2025 at 02:14:41PM +0000, Ricardo Ribalda wrote:
quoted
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:
./cyttsp5.c:927:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <redacted>
---
 drivers/input/touchscreen/cyttsp5.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Suppose it will go though input subsystem intead of media.
Need post seperated at difference thread?
Indeed, it belongs to input. if there is a v2 I will move it to a
different thread.

Thanks!
Frank
quoted
diff --git a/drivers/input/touchscreen/cyttsp5.c b/drivers/input/touchscreen/cyttsp5.c
index 071b7c9bf566eb0b58e302a941ec085be1eb5683..47f4271395a69b8350f9be7266b57fe11d442ee3 100644
--- a/drivers/input/touchscreen/cyttsp5.c
+++ b/drivers/input/touchscreen/cyttsp5.c
@@ -923,8 +923,8 @@ static int cyttsp5_i2c_probe(struct i2c_client *client)

      regmap = devm_regmap_init_i2c(client, &config);
      if (IS_ERR(regmap)) {
-             dev_err(&client->dev, "regmap allocation failed: %ld\n",
-                     PTR_ERR(regmap));
+             dev_err(&client->dev, "regmap allocation failed: %pe\n",
+                     regmap);
              return PTR_ERR(regmap);
      }


--
2.51.0.760.g7b8bcc2412-goog


-- 
Ricardo Ribalda
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help