[PATCH 01/32] Input: cyttsp5 - Use %pe format specifier
Frank Li
Frank.li at nxp.com
Mon Oct 13 08:35:57 PDT 2025
On Mon, Oct 13, 2025 at 02:14:41PM +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:
> ./cyttsp5.c:927:3-10: WARNING: Consider using %pe to print PTR_ERR()
>
> Signed-off-by: Ricardo Ribalda <ribalda at chromium.org>
> ---
> 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?
Frank
>
> 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
>
More information about the Linux-mediatek
mailing list