mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Peng Fan <peng.fan@nxp.com>
Cc: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"brgl@bgdev.pl" <brgl@bgdev.pl>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V2] gpiolib: use dev_err() when gpiod_configure_flags failed
Date: Wed, 20 Mar 2024 13:21:35 +0200	[thread overview]
Message-ID: <ZfrGvwV92a9Zzrg_@smile.fi.intel.com> (raw)
In-Reply-To: <DU0PR04MB9417FEFA3DB02082D02A963F88332@DU0PR04MB9417.eurprd04.prod.outlook.com>

On Wed, Mar 20, 2024 at 11:07:40AM +0000, Peng Fan wrote:
> > On Wed, Mar 20, 2024 at 9:25 AM Peng Fan (OSS) <peng.fan@oss.nxp.com>
> > wrote:

...

> > > 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?

Moving it to error level.
Usually developers enable CONFIG_DEBUG_GPIO for these messages to appear.

...

> > >         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.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2024-03-20 11:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20  7:33 Peng Fan (OSS)
2024-03-20 10:33 ` Andy Shevchenko
2024-03-20 11:07   ` Peng Fan
2024-03-20 11:21     ` Andy Shevchenko [this message]
2024-03-21  5:40       ` Peng Fan
2024-03-21 15:37         ` Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZfrGvwV92a9Zzrg_@smile.fi.intel.com \
    --to=andy.shevchenko@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peng.fan@nxp.com \
    --cc=peng.fan@oss.nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®