[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdZg559ogf5koyxA_urM949ee-+upauYWQmo-sPUQn-g2w@mail.gmail.com>
Date: Tue, 27 May 2014 15:33:45 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: abdoulaye berthe <berthe.ab@...il.com>
Cc: Alexandre Courbot <gnurou@...il.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Stephen Rothwell <sfr@...b.auug.org.au>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpio: gpiolib: set gpiochip_remove retval to void
On Fri, May 23, 2014 at 7:03 PM, abdoulaye berthe <berthe.ab@...il.com> wrote:
> This avoids handling gpiochip remove error in device
> remove handler.
>
> Signed-off-by: abdoulaye berthe <berthe.ab@...il.com>
In general this is the right thing to do.
> for (id = 0; id < chip->ngpio; id++) {
> - if (test_bit(FLAG_REQUESTED, &chip->desc[id].flags)) {
> - status = -EBUSY;
> - break;
> - }
> - }
> - if (status == 0) {
> - for (id = 0; id < chip->ngpio; id++)
> - chip->desc[id].chip = NULL;
> -
> - list_del(&chip->list);
> + if (test_bit(FLAG_REQUESTED, &chip->desc[id].flags))
> + panic("gpiolib.c: gpiochip is still requested\n");
panic("gpio: removing gpiochip with gpios still requested\");
is more helpful.
But I want a patch that also removes *ALL* users of the return value
from this function in the *same* patch to avoid bisectability issues.
$ git grep gpiochip_remove
Then fix all of them or use coccinelle.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists