[PATCH 5/5] power: Use %pe to print error pointers symbolically
Sumeet Pawnikar
sumeet4linux at gmail.com
Sat Sep 12 12:10:23 PDT 2026
On Sun, Sep 6, 2026 at 12:00 PM Krzysztof Kozlowski <krzk at kernel.org> wrote:
>
> On 06/09/2026 08:17, Sumeet Pawnikar wrote:
> > }
> > diff --git a/drivers/power/supply/cw2015_battery.c b/drivers/power/supply/cw2015_battery.c
> > index 1bcb60cf763d..48643f7bf503 100644
> > --- a/drivers/power/supply/cw2015_battery.c
> > +++ b/drivers/power/supply/cw2015_battery.c
> > @@ -658,8 +658,8 @@ static int cw_bat_probe(struct i2c_client *client)
> >
> > cw_bat->regmap = devm_regmap_init_i2c(client, &cw2015_regmap_config);
> > if (IS_ERR(cw_bat->regmap)) {
> > - dev_err(cw_bat->dev, "Failed to allocate regmap: %ld\n",
> > - PTR_ERR(cw_bat->regmap));
> > + dev_err(cw_bat->dev, "Failed to allocate regmap: %pe\n",
> > + cw_bat->regmap);
> > return PTR_ERR(cw_bat->regmap);
>
> return dev_err_probe
>
> Instead you should use dev_err_probe and drop the last argument.
>
Sure. I'll do this suggested usage of dev_err_probe in different patch
series for *_probe() functions update.
As of now reverting the change for dev_err under *_porbe() function
and planning to post V2 for this original series to use %pe for review.
Thanks,
Sumeet.
> Best regards,
> Krzysztof
More information about the linux-arm-kernel
mailing list