mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] gpio: omap: fix static checker warning
@ 2015-09-25 19:06 Grygorii Strashko
  2015-10-16 14:37 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Grygorii Strashko @ 2015-09-25 19:06 UTC (permalink / raw)
  To: Linus Walleij, Alexandre Courbot, ssantosh, tony
  Cc: Javier Martinez Canillas, linux-omap, linux-gpio, linux-kernel,
	Grygorii Strashko

This patch fixes below static checker warning by changing
type of irq field in struct gpio_bank from u16 to int.

drivers/gpio/gpio-omap.c:1191 omap_gpio_probe()
	warn: assigning (-6) to unsigned variable 'bank->irq'

drivers/gpio/gpio-omap.c
  1188          bank->irq = platform_get_irq(pdev, 0);
  1189          if (bank->irq <= 0) {

bank->irq is u16.

  1190                  if (!bank->irq)
  1191                          bank->irq = -ENXIO;

Does not work.

  1192                  if (bank->irq != -EPROBE_DEFER)

Does not work.

  1193                          dev_err(dev,
  1194                                  "can't get irq resource ret=%d\n", bank->irq);
  1195                  return bank->irq;
  1196          }

Fixes: commit 89d18e3af8b9: "gpio: omap: switch to use platform_get_irq"
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 drivers/gpio/gpio-omap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 376827f..56d2d02 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -51,7 +51,7 @@ struct gpio_regs {
 struct gpio_bank {
 	struct list_head node;
 	void __iomem *base;
-	u16 irq;
+	int irq;
 	u32 non_wakeup_gpios;
 	u32 enabled_non_wakeup_gpios;
 	struct gpio_regs context;
-- 
2.5.1


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

* Re: [PATCH] gpio: omap: fix static checker warning
  2015-09-25 19:06 [PATCH] gpio: omap: fix static checker warning Grygorii Strashko
@ 2015-10-16 14:37 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2015-10-16 14:37 UTC (permalink / raw)
  To: Grygorii Strashko
  Cc: Alexandre Courbot, Santosh Shilimkar, Tony Lindgren,
	Javier Martinez Canillas, Linux-OMAP, linux-gpio, linux-kernel

On Fri, Sep 25, 2015 at 9:06 PM, Grygorii Strashko
<grygorii.strashko@ti.com> wrote:

> This patch fixes below static checker warning by changing
> type of irq field in struct gpio_bank from u16 to int.

Nobody's saying anything, I'll just apply this.

Yours,
Linus Walleij

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

end of thread, other threads:[~2015-10-16 14:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-25 19:06 [PATCH] gpio: omap: fix static checker warning Grygorii Strashko
2015-10-16 14:37 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®