All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: st: Fix Sparse error
@ 2014-09-29 13:48 Pramod Gurav
  2014-09-29 13:47 ` Patrice Chotard
  2014-09-29 14:46 ` Srinivas Kandagatla
  0 siblings, 2 replies; 7+ messages in thread
From: Pramod Gurav @ 2014-09-29 13:48 UTC (permalink / raw)
  To: linux-kernel
  Cc: Pramod Gurav, Maxime Coquelin, Patrice Chotard, Linus Walleij,
	Srinivas Kandagatla

This change fixes below sparse error,
drivers/pinctrl/pinctrl-st.c:1515:31: error: incompatible types for operation (>)
drivers/pinctrl/pinctrl-st.c:1515:31:    left side has type void [noderef] <asn:2>*irqmux_base
drivers/pinctrl/pinctrl-st.c:1515:31:    right side has type int

The fix is done by removing a check on info->irqmux_base as
info->irqmux_base has already been checked  for error when allocating it.
Hence there is no need to redo the check.

Cc: Maxime Coquelin <maxime.coquelin@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
CC: Linus Walleij <linus.walleij@linaro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
---
 drivers/pinctrl/pinctrl-st.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
index 5475374..ddeaeda 100644
--- a/drivers/pinctrl/pinctrl-st.c
+++ b/drivers/pinctrl/pinctrl-st.c
@@ -1512,7 +1512,7 @@ static int st_gpiolib_register_bank(struct st_pinctrl *info,
 					     gpio_irq, st_gpio_irq_handler);
 	}
 
-	if (info->irqmux_base > 0 || gpio_irq > 0) {
+	if (gpio_irq > 0) {
 		err = gpiochip_irqchip_add(&bank->gpio_chip, &st_gpio_irqchip,
 					   0, handle_simple_irq,
 					   IRQ_TYPE_LEVEL_LOW);
-- 
1.7.9.5


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

end of thread, other threads:[~2014-09-29 16:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-29 13:48 [PATCH] pinctrl: st: Fix Sparse error Pramod Gurav
2014-09-29 13:47 ` Patrice Chotard
2014-09-29 14:46 ` Srinivas Kandagatla
2014-09-29 15:05   ` Pramod Gurav
2014-09-29 15:38     ` Srinivas Kandagatla
2014-09-29 16:10       ` Pramod Gurav
2014-09-29 15:09   ` Daniel Thompson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.