Re: [PATCH v2 06/11] iio: gyro: change from %ld to %pe for PTR_ERR() printing
From: Andy Shevchenko
Date: Thu Jun 04 2026 - 16:09:07 EST
On Thu, Jun 4, 2026 at 3:03 PM Vojtěch Krátký <vo.kratky@xxxxxxxxx> wrote:
>
> Replace numeric PTR_ERR() logging with the %pe format specifier
> so that error values are printed in a more readable form.
>
> This change was identified using a Coccinelle semantic patch.
>
> No functional change intended.
NAK (in this form). See below why.
Also note, the same applies to the similar cases in all patches like this.
...
> regmap = devm_regmap_init_i2c(i2c, &fxas21002c_regmap_i2c_conf);
> if (IS_ERR(regmap)) {
> - dev_err(&i2c->dev, "Failed to register i2c regmap: %ld\n",
> - PTR_ERR(regmap));
> + dev_err(&i2c->dev, "Failed to register i2c regmap: %pe\n",
> + regmap);
> return PTR_ERR(regmap);
This should be simply moved to dev_err_probe(). With that %pe will be
implied. Also it will save the time to move to dev_err_probe()
directly without any trampoline like this.
> }
--
With Best Regards,
Andy Shevchenko