linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Claus H . Stovgaard" <cst@phaseone.com>
Subject: Re: [PATCH] gpio: don't WARN() on NULL descs if gpiolib is disabled
Date: Sat, 20 Jul 2019 20:03:13 +0200	[thread overview]
Message-ID: <CAMpxmJWDTkhuWhfSJ-fkJ6r+7a3kErXafQ_sJLVgMf=cA=1+aQ@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdaiZgK1EoaUxDtbm_GJHVjZU56e_qBQ-OF0mmwb5W8+tg@mail.gmail.com>

wt., 16 lip 2019 o 23:46 Linus Walleij <linus.walleij@linaro.org> napisał(a):
>
> On Tue, Jul 9, 2019 at 4:20 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> > wt., 9 lip 2019 o 15:30 Linus Walleij <linus.walleij@linaro.org> napisał(a):
>
> > > I was thinking something like this in the stubs:
> > >
> > > gpiod_get[_index]() {
> > >     return POISON;
> > > }
> > >
> > > gpiod_get[_index]_optional() {
> > >    return NULL;
> > > }
> >
> > This is already being done.
>
> Ah it is.
>
> > > This way all gpiod_get() and optional calls are properly
> > > handled and the semantic that only _optional calls
> > > can return NULL is preserved. (Your patch would
> > > violate this.)
> > >
> >
> > Maybe I'm missing something, but I don't quite see how my patch
> > violates this behavior. :(
>
> I missed that we actually do pass a poison from the strict
> *get functions, mea culpa.
>
> Let's apply this, will you send me a pull request or shall I
> just try to apply it?
>
> Yours,
> Linus Walleij

I'll apply it to my local tree and send it for v5.3-rc2.

Bart

  reply	other threads:[~2019-07-20 18:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08  8:23 [PATCH] gpio: don't WARN() on NULL descs if gpiolib is disabled Bartosz Golaszewski
2019-07-08 10:18 ` Claus H. Stovgaard
2019-07-09 13:30 ` Linus Walleij
2019-07-09 14:20   ` Bartosz Golaszewski
2019-07-16 21:46     ` Linus Walleij
2019-07-20 18:03       ` Bartosz Golaszewski [this message]
2019-07-20 19:44         ` Linus Walleij
2019-07-22  6:14           ` Bartosz Golaszewski
2019-07-10 13:09   ` Enrico Weigelt, metux IT consult
2019-07-10 20:02   ` Claus H. Stovgaard

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='CAMpxmJWDTkhuWhfSJ-fkJ6r+7a3kErXafQ_sJLVgMf=cA=1+aQ@mail.gmail.com' \
    --to=bgolaszewski@baylibre.com \
    --cc=brgl@bgdev.pl \
    --cc=cst@phaseone.com \
    --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).