linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] gpiolib: check the 'ngpios' property in core gpiolib code
Date: Thu, 18 Nov 2021 19:06:38 +0200	[thread overview]
Message-ID: <YZaIHnPQCsMucEMt@smile.fi.intel.com> (raw)
In-Reply-To: <YZaG9vPYh4YIwEIi@smile.fi.intel.com>

On Thu, Nov 18, 2021 at 07:01:42PM +0200, Andy Shevchenko wrote:
> On Thu, Nov 18, 2021 at 05:38:14PM +0100, Bartosz Golaszewski wrote:
> > On Thu, Nov 18, 2021 at 4:46 PM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > > On Thu, Nov 18, 2021 at 02:23:17PM +0100, Bartosz Golaszewski wrote:

...

> > > > +             if (ret) {

> > > > +                     ret = -EINVAL;
> > >
> > > Sorry, forgot to ask, why this is needed?
> > 
> > What do you mean? 0 lines doesn't sound like a valid value so -EINVAL
> > is in order.
> 
> What is so special about -EINVAL? Why ret can't be returned?

See another mail, I explained how the code should be.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2021-11-18 17:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-18 13:23 [PATCH v2 1/2] gpiolib: improve coding style for local variables Bartosz Golaszewski
2021-11-18 13:23 ` [PATCH v2 2/2] gpiolib: check the 'ngpios' property in core gpiolib code Bartosz Golaszewski
2021-11-18 15:44   ` Andy Shevchenko
2021-11-18 16:38     ` Bartosz Golaszewski
2021-11-18 17:01       ` Andy Shevchenko
2021-11-18 17:06         ` Andy Shevchenko [this message]
2021-11-18 17:05   ` Andy Shevchenko
2021-11-18 20:12     ` Bartosz Golaszewski
2021-11-18 21:16       ` Andy Shevchenko
2021-11-19 19:35         ` Bartosz Golaszewski
2021-11-22 11:20           ` Andy Shevchenko
2021-11-18 15:44 ` [PATCH v2 1/2] gpiolib: improve coding style for local variables Andy Shevchenko
2021-11-19  7:57 ` Johan Hovold

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=YZaIHnPQCsMucEMt@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=brgl@bgdev.pl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).