gpio: drop devm_gpio_chip_match()

Message ID 20181107231507.28943-1-laurent.pinchart+renesas@ideasonboard.com
State New
Headers show
Series
  • gpio: drop devm_gpio_chip_match()
Related show

Commit Message

Laurent Pinchart Nov. 7, 2018, 11:15 p.m.
Commit 48207d7595d2 ("gpio: drop devm_gpiochip_remove()") dropped the
last user of drop devm_gpio_chip_match(), causing a defined but not used
compilation warning. Fix it by removing the function.

Fixes: 48207d7595d2 ("gpio: drop devm_gpiochip_remove()")
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/gpio/gpiolib.c | 14 --------------
 1 file changed, 14 deletions(-)

Comments

Uwe Kleine-König Nov. 8, 2018, 6:24 a.m. | #1
On Thu, Nov 08, 2018 at 01:15:07AM +0200, Laurent Pinchart wrote:
> Commit 48207d7595d2 ("gpio: drop devm_gpiochip_remove()") dropped the
> last user of drop devm_gpio_chip_match(), causing a defined but not used
> compilation warning. Fix it by removing the function.
> 
> Fixes: 48207d7595d2 ("gpio: drop devm_gpiochip_remove()")
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

I thought Linus Walleij would maybe fix that up. (He didn't react yet to
my question about this). 

Other than that:

	Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Thanks
Uwe
Olof Johansson Nov. 10, 2018, 9:59 p.m. | #2
On Wed, Nov 7, 2018 at 3:15 PM Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
>
> Commit 48207d7595d2 ("gpio: drop devm_gpiochip_remove()") dropped the
> last user of drop devm_gpio_chip_match(), causing a defined but not used
> compilation warning. Fix it by removing the function.
>
> Fixes: 48207d7595d2 ("gpio: drop devm_gpiochip_remove()")
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Acked-by: Olof Johansson <olof@lixom.net>


-Olof
Linus Walleij Nov. 15, 2018, 8:59 a.m. | #3
On Thu, Nov 8, 2018 at 12:15 AM Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:

> Commit 48207d7595d2 ("gpio: drop devm_gpiochip_remove()") dropped the
> last user of drop devm_gpio_chip_match(), causing a defined but not used
> compilation warning. Fix it by removing the function.
>
> Fixes: 48207d7595d2 ("gpio: drop devm_gpiochip_remove()")
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Patch applied, thanks Laurent!

Yours,
Linus Walleij
Linus Walleij Nov. 15, 2018, 8:59 a.m. | #4
On Thu, Nov 8, 2018 at 7:24 AM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> On Thu, Nov 08, 2018 at 01:15:07AM +0200, Laurent Pinchart wrote:
> > Commit 48207d7595d2 ("gpio: drop devm_gpiochip_remove()") dropped the
> > last user of drop devm_gpio_chip_match(), causing a defined but not used
> > compilation warning. Fix it by removing the function.
> >
> > Fixes: 48207d7595d2 ("gpio: drop devm_gpiochip_remove()")
> > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
>
> I thought Linus Walleij would maybe fix that up. (He didn't react yet to
> my question about this).

I would have but now Laurent fixed it instead :)

I was swamped the last week so I didn't get around to
fixing it up.

Yours,
Linus Walleij

Patch

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 2a9d50678aa1..d61fdcb26fbd 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1511,20 +1511,6 @@  static void devm_gpio_chip_release(struct device *dev, void *res)
 	gpiochip_remove(chip);
 }
 
-static int devm_gpio_chip_match(struct device *dev, void *res, void *data)
-
-{
-	struct gpio_chip **r = res;
-
-	if (!r || !*r) {
-		WARN_ON(!r || !*r);
-		return 0;
-	}
-
-	return *r == data;
-}
-
-
 /**
  * devm_gpiochip_add_data() - Resource manager gpiochip_add_data()
  * @dev: pointer to the device that gpio_chip belongs to.