linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	linux-gpio <linux-gpio@vger.kernel.org>,
	Jean Delvare <jdelvare@suse.com>, Wolfram Sang <wsa@kernel.org>,
	linux-i2c <linux-i2c@vger.kernel.org>
Subject: Re: [PATCH v1 1/3] gpiolib: Follow usual pattern for gpiod_remove_lookup_table() call
Date: Mon, 4 Jan 2021 16:33:02 +0200	[thread overview]
Message-ID: <20210104143302.GZ4077@smile.fi.intel.com> (raw)
In-Reply-To: <CAMpxmJUM-6p_V5c6y+7kzhx92V1qEYC5xNS_PNDLcQYTOzHA2A@mail.gmail.com>

On Mon, Jan 04, 2021 at 03:24:47PM +0100, Bartosz Golaszewski wrote:
> On Mon, Dec 28, 2020 at 9:06 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > The usual pattern for the remove calls, like gpiod_remove_lookup_table(),
> > is to be NULL-aware, i.o.w. become a no-op whenever parameter is NULL.
> > Update gpiod_remove_lookup_table() call to follow this pattern.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> >  drivers/gpio/gpiolib.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> > index b02cc2abd3b6..611d6ea82d75 100644
> > --- a/drivers/gpio/gpiolib.c
> > +++ b/drivers/gpio/gpiolib.c
> > @@ -3460,6 +3460,10 @@ EXPORT_SYMBOL_GPL(gpiod_add_lookup_table);
> >   */
> >  void gpiod_remove_lookup_table(struct gpiod_lookup_table *table)
> >  {
> > +       /* Nothing to remove */
> > +       if (!table)
> > +               return;
> > +
> >         mutex_lock(&gpio_lookup_lock);
> >
> >         list_del(&table->list);
> > --
> > 2.29.2
> >
> 
> Applied, thanks!

Thanks. Though I think it can be also applied to I²C tree since dependency?
Any tags / immutable branch for Wolfram?

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2021-01-04 14:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-28 20:06 [PATCH v1 1/3] gpiolib: Follow usual pattern for gpiod_remove_lookup_table() call Andy Shevchenko
2020-12-28 20:06 ` [PATCH v1 2/3] i2c: i801: Drop duplicate NULL check in i801_del_mux() Andy Shevchenko
2021-01-06 16:03   ` Jean Delvare
2020-12-28 20:06 ` [PATCH v1 3/3] i2c: i801: Refactor mux code since platform_device_unregister() is NULL aware Andy Shevchenko
2021-01-06 16:03   ` Jean Delvare
2021-01-04 14:24 ` [PATCH v1 1/3] gpiolib: Follow usual pattern for gpiod_remove_lookup_table() call Bartosz Golaszewski
2021-01-04 14:33   ` Andy Shevchenko [this message]
2021-01-04 14:59     ` Bartosz Golaszewski
2021-01-06 16:03 ` Jean Delvare

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=20210104143302.GZ4077@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=jdelvare@suse.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=wsa@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).