linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Courbot <gnurou@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] gpio: return NULL from gpiod_get_optional when GPIOLIB is disabled
Date: Fri, 20 Feb 2015 14:37:47 +0900	[thread overview]
Message-ID: <CAAVeFuKrdcSmsS5S4eiQRDVeEZ2ks9J475jDFV7uH9cMCuthLg@mail.gmail.com> (raw)
In-Reply-To: <20150220053344.GA5518@dtor-glaptop>

On Fri, Feb 20, 2015 at 2:33 PM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
>> I should have commented at that time, but let's do it now: I agree
>> with the idea, but this leaves the door open to confusing situations
>> in case gpiolib was unintentionally disabled. Could you also add a
>> note in the documentation of this function to explain this behavior,
>> to spare a few headaches to users of this function?
>
> You mean the inline documentation in drivers/gpio/gpiolib.c and
> drivers/gpio/devres.c? I can certainly mention there that is GPIOLIB is disabled
> thy will return NULL unlike the non-optional variants.

I was thinking about Documentation/gpio/consumer.txt, but having a
note in the inline documentation as well certainly makes sense.

  reply	other threads:[~2015-02-20  5:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-20  0:30 [PATCH] gpio: return NULL from gpiod_get_optional when GPIOLIB is disabled Dmitry Torokhov
2015-02-20  4:59 ` Alexandre Courbot
2015-02-20  5:33   ` Dmitry Torokhov
2015-02-20  5:37     ` Alexandre Courbot [this message]
2015-02-20 18:54     ` Uwe Kleine-König

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=CAAVeFuKrdcSmsS5S4eiQRDVeEZ2ks9J475jDFV7uH9cMCuthLg@mail.gmail.com \
    --to=gnurou@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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).