[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMRc=Mcm-AkYmhfA4KfDDaNJaOx51+0yVQuXSJt2Ac1rb4FQ4w@mail.gmail.com>
Date: Thu, 21 Mar 2024 16:37:53 +0100
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Peng Fan <peng.fan@....com>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>, "Peng Fan (OSS)" <peng.fan@....nxp.com>,
"linus.walleij@...aro.org" <linus.walleij@...aro.org>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2] gpiolib: use dev_err() when gpiod_configure_flags failed
On Thu, Mar 21, 2024 at 6:40 AM Peng Fan <peng.fan@....com> wrote:
> > > >
> > > > I'm not convinced, so not my call to approve / reject, but see a remark
> > below.
> > >
> > > You mean dev_err not help or else?
> >
> > Moving it to error level.
> > Usually developers enable CONFIG_DEBUG_GPIO for these messages to
> > appear.
>
> But this is a error log. Let's leave this to gpio maintainers.
>
I'm fine with this change.
> >
> > ...
> >
> > > > > 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?
> >
> > Yes, the system gives resource back as soon as possible.
>
> Got it.
>
Please change this and resend it.
Bart
Powered by blists - more mailing lists