RE: [PATCH V2] gpiolib: use dev_err() when gpiod_configure_flags failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Subject: Re: [PATCH V2] gpiolib: use dev_err() when gpiod_configure_flags
> failed
> 
> On Wed, Mar 20, 2024 at 9:25 AM Peng Fan (OSS) <peng.fan@xxxxxxxxxxx>
> wrote:
> >
> > From: Peng Fan <peng.fan@xxxxxxx>
> >
> > When gpio-ranges property was missed to be added in the gpio node,
> > using dev_err() to show an error message will helping to locate issues
> > easier.
> 
> I'm not convinced, so not my call to approve / reject, but see a remark below.

You mean dev_err not help or else?

> 
> ...
> 
> >         ret = gpiod_configure_flags(desc, con_id, lookupflags, flags);
> >         if (ret < 0) {
> > -               dev_dbg(consumer, "setup of GPIO %s failed\n", con_id);
> > +               dev_err(consumer, "setup of GPIO %s failed: %d\n",
> > + con_id, ret);
> >                 gpiod_put(desc);
> >                 return ERR_PTR(ret);
> 
> While at it, can you move it to be after the gpiod_put()?

Does it matter?

Thanks,
Peng.

> 
> >         }
> 
> --
> With Best Regards,
> Andy Shevchenko




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux