linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: bcm2835: fix build warning in bcm2835_gpio_irq_handle_bank
@ 2017-09-19 19:04 Corentin Labbe
  2017-09-20  7:08 ` Stefan Wahren
  2017-09-21 12:12 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Corentin Labbe @ 2017-09-19 19:04 UTC (permalink / raw)
  To: linus.walleij, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, eric, stefan.wahren
  Cc: linux-gpio, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Corentin Labbe

This patch fix the following build warning:
drivers/pinctrl/bcm/pinctrl-bcm2835.c:376:15: warning: variable 'type' set but not used [-Wunused-but-set-variable]

Furthermore, it is unused for a long time, at least since commit 85ae9e512f43 ("pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP")
where a "FIXME no clue why the code looks up the type here" was added.
A year after, nobody answeered this question, so its time to remove it.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 drivers/pinctrl/bcm/pinctrl-bcm2835.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index 0944310225db..ff782445dfb7 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -373,16 +373,12 @@ static void bcm2835_gpio_irq_handle_bank(struct bcm2835_pinctrl *pc,
 	unsigned long events;
 	unsigned offset;
 	unsigned gpio;
-	unsigned int type;
 
 	events = bcm2835_gpio_rd(pc, GPEDS0 + bank * 4);
 	events &= mask;
 	events &= pc->enabled_irq_map[bank];
 	for_each_set_bit(offset, &events, 32) {
 		gpio = (32 * bank) + offset;
-		/* FIXME: no clue why the code looks up the type here */
-		type = pc->irq_type[gpio];
-
 		generic_handle_irq(irq_linear_revmap(pc->gpio_chip.irqdomain,
 						     gpio));
 	}
-- 
2.13.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] pinctrl: bcm2835: fix build warning in bcm2835_gpio_irq_handle_bank
  2017-09-19 19:04 [PATCH] pinctrl: bcm2835: fix build warning in bcm2835_gpio_irq_handle_bank Corentin Labbe
@ 2017-09-20  7:08 ` Stefan Wahren
  2017-09-21 12:12 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Wahren @ 2017-09-20  7:08 UTC (permalink / raw)
  To: Corentin Labbe, linus.walleij, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list, eric
  Cc: linux-gpio, linux-rpi-kernel, linux-arm-kernel, linux-kernel


Am 19.09.2017 um 21:04 schrieb Corentin Labbe:
> This patch fix the following build warning:
> drivers/pinctrl/bcm/pinctrl-bcm2835.c:376:15: warning: variable 'type' set but not used [-Wunused-but-set-variable]
>
> Furthermore, it is unused for a long time, at least since commit 85ae9e512f43 ("pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP")
> where a "FIXME no clue why the code looks up the type here" was added.
> A year after, nobody answeered this question, so its time to remove it.
>
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>

Acked-by: Stefan Wahren <stefan.wahren@i2se.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pinctrl: bcm2835: fix build warning in bcm2835_gpio_irq_handle_bank
  2017-09-19 19:04 [PATCH] pinctrl: bcm2835: fix build warning in bcm2835_gpio_irq_handle_bank Corentin Labbe
  2017-09-20  7:08 ` Stefan Wahren
@ 2017-09-21 12:12 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2017-09-21 12:12 UTC (permalink / raw)
  To: Corentin Labbe
  Cc: Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Eric Anholt, Stefan Wahren,
	linux-gpio@vger.kernel.org, linux-rpi-kernel,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org

On Tue, Sep 19, 2017 at 9:04 PM, Corentin Labbe
<clabbe.montjoie@gmail.com> wrote:

> This patch fix the following build warning:
> drivers/pinctrl/bcm/pinctrl-bcm2835.c:376:15: warning: variable 'type' set but not used [-Wunused-but-set-variable]
>
> Furthermore, it is unused for a long time, at least since commit 85ae9e512f43 ("pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP")
> where a "FIXME no clue why the code looks up the type here" was added.
> A year after, nobody answeered this question, so its time to remove it.
>
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>

Patch applied with Stefan's ACK.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-21 12:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-19 19:04 [PATCH] pinctrl: bcm2835: fix build warning in bcm2835_gpio_irq_handle_bank Corentin Labbe
2017-09-20  7:08 ` Stefan Wahren
2017-09-21 12:12 ` Linus Walleij

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).