* [PATCH] gpio: aspeed: avoid return type warning
@ 2019-12-10 20:28 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2019-12-10 20:28 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Joel Stanley, Andrew Jeffery
Cc: Arnd Bergmann, Hongwei Zhang, linux-gpio, linux-arm-kernel,
linux-aspeed, linux-kernel
gcc has a hard time tracking whether BUG_ON(1) ends
execution or not:
drivers/gpio/gpio-aspeed-sgpio.c: In function 'bank_reg':
drivers/gpio/gpio-aspeed-sgpio.c:112:1: error: control reaches end of non-void function [-Werror=return-type]
Use the simpler BUG() that gcc knows cannot continue.
Fixes: f8b410e3695a ("gpio: aspeed-sgpio: Rename and add Kconfig/Makefile")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpio/gpio-aspeed-sgpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-aspeed-sgpio.c b/drivers/gpio/gpio-aspeed-sgpio.c
index 7e99860ca447..8319812593e3 100644
--- a/drivers/gpio/gpio-aspeed-sgpio.c
+++ b/drivers/gpio/gpio-aspeed-sgpio.c
@@ -107,7 +107,7 @@ static void __iomem *bank_reg(struct aspeed_sgpio *gpio,
return gpio->base + bank->irq_regs + GPIO_IRQ_STATUS;
default:
/* acturally if code runs to here, it's an error case */
- BUG_ON(1);
+ BUG();
}
}
--
2.20.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] gpio: aspeed: avoid return type warning
@ 2019-12-10 20:28 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2019-12-10 20:28 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Joel Stanley, Andrew Jeffery
Cc: Arnd Bergmann, linux-aspeed, linux-kernel, linux-gpio,
Hongwei Zhang, linux-arm-kernel
gcc has a hard time tracking whether BUG_ON(1) ends
execution or not:
drivers/gpio/gpio-aspeed-sgpio.c: In function 'bank_reg':
drivers/gpio/gpio-aspeed-sgpio.c:112:1: error: control reaches end of non-void function [-Werror=return-type]
Use the simpler BUG() that gcc knows cannot continue.
Fixes: f8b410e3695a ("gpio: aspeed-sgpio: Rename and add Kconfig/Makefile")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpio/gpio-aspeed-sgpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-aspeed-sgpio.c b/drivers/gpio/gpio-aspeed-sgpio.c
index 7e99860ca447..8319812593e3 100644
--- a/drivers/gpio/gpio-aspeed-sgpio.c
+++ b/drivers/gpio/gpio-aspeed-sgpio.c
@@ -107,7 +107,7 @@ static void __iomem *bank_reg(struct aspeed_sgpio *gpio,
return gpio->base + bank->irq_regs + GPIO_IRQ_STATUS;
default:
/* acturally if code runs to here, it's an error case */
- BUG_ON(1);
+ BUG();
}
}
--
2.20.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] gpio: aspeed: avoid return type warning
2019-12-10 20:28 ` Arnd Bergmann
@ 2019-12-10 22:12 ` Andrew Jeffery
-1 siblings, 0 replies; 6+ messages in thread
From: Andrew Jeffery @ 2019-12-10 22:12 UTC (permalink / raw)
To: Arnd Bergmann, Linus Walleij, Bartosz Golaszewski, Joel Stanley
Cc: Hongwei Zhang, linux-gpio, linux-arm-kernel, linux-aspeed, linux-kernel
On Wed, 11 Dec 2019, at 06:58, Arnd Bergmann wrote:
> gcc has a hard time tracking whether BUG_ON(1) ends
> execution or not:
>
> drivers/gpio/gpio-aspeed-sgpio.c: In function 'bank_reg':
> drivers/gpio/gpio-aspeed-sgpio.c:112:1: error: control reaches end of
> non-void function [-Werror=return-type]
>
> Use the simpler BUG() that gcc knows cannot continue.
>
> Fixes: f8b410e3695a ("gpio: aspeed-sgpio: Rename and add Kconfig/Makefile")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Andrew Jeffery <andrew@aj.id.au>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gpio: aspeed: avoid return type warning
@ 2019-12-10 22:12 ` Andrew Jeffery
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Jeffery @ 2019-12-10 22:12 UTC (permalink / raw)
To: Arnd Bergmann, Linus Walleij, Bartosz Golaszewski, Joel Stanley
Cc: linux-gpio, linux-aspeed, Hongwei Zhang, linux-arm-kernel, linux-kernel
On Wed, 11 Dec 2019, at 06:58, Arnd Bergmann wrote:
> gcc has a hard time tracking whether BUG_ON(1) ends
> execution or not:
>
> drivers/gpio/gpio-aspeed-sgpio.c: In function 'bank_reg':
> drivers/gpio/gpio-aspeed-sgpio.c:112:1: error: control reaches end of
> non-void function [-Werror=return-type]
>
> Use the simpler BUG() that gcc knows cannot continue.
>
> Fixes: f8b410e3695a ("gpio: aspeed-sgpio: Rename and add Kconfig/Makefile")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Andrew Jeffery <andrew@aj.id.au>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gpio: aspeed: avoid return type warning
2019-12-10 22:12 ` Andrew Jeffery
@ 2019-12-11 9:07 ` Bartosz Golaszewski
-1 siblings, 0 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2019-12-11 9:07 UTC (permalink / raw)
To: Andrew Jeffery
Cc: Arnd Bergmann, Linus Walleij, Joel Stanley, Hongwei Zhang,
linux-gpio, arm-soc, linux-aspeed, LKML
wt., 10 gru 2019 o 23:10 Andrew Jeffery <andrew@aj.id.au> napisał(a):
>
>
>
> On Wed, 11 Dec 2019, at 06:58, Arnd Bergmann wrote:
> > gcc has a hard time tracking whether BUG_ON(1) ends
> > execution or not:
> >
> > drivers/gpio/gpio-aspeed-sgpio.c: In function 'bank_reg':
> > drivers/gpio/gpio-aspeed-sgpio.c:112:1: error: control reaches end of
> > non-void function [-Werror=return-type]
> >
> > Use the simpler BUG() that gcc knows cannot continue.
> >
> > Fixes: f8b410e3695a ("gpio: aspeed-sgpio: Rename and add Kconfig/Makefile")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Acked-by: Andrew Jeffery <andrew@aj.id.au>
Applied for fixes.
Bartosz
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gpio: aspeed: avoid return type warning
@ 2019-12-11 9:07 ` Bartosz Golaszewski
0 siblings, 0 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2019-12-11 9:07 UTC (permalink / raw)
To: Andrew Jeffery
Cc: linux-aspeed, Arnd Bergmann, Linus Walleij, LKML, linux-gpio,
Joel Stanley, Hongwei Zhang, arm-soc
wt., 10 gru 2019 o 23:10 Andrew Jeffery <andrew@aj.id.au> napisał(a):
>
>
>
> On Wed, 11 Dec 2019, at 06:58, Arnd Bergmann wrote:
> > gcc has a hard time tracking whether BUG_ON(1) ends
> > execution or not:
> >
> > drivers/gpio/gpio-aspeed-sgpio.c: In function 'bank_reg':
> > drivers/gpio/gpio-aspeed-sgpio.c:112:1: error: control reaches end of
> > non-void function [-Werror=return-type]
> >
> > Use the simpler BUG() that gcc knows cannot continue.
> >
> > Fixes: f8b410e3695a ("gpio: aspeed-sgpio: Rename and add Kconfig/Makefile")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Acked-by: Andrew Jeffery <andrew@aj.id.au>
Applied for fixes.
Bartosz
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-12-11 9:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 20:28 [PATCH] gpio: aspeed: avoid return type warning Arnd Bergmann
2019-12-10 20:28 ` Arnd Bergmann
2019-12-10 22:12 ` Andrew Jeffery
2019-12-10 22:12 ` Andrew Jeffery
2019-12-11 9:07 ` Bartosz Golaszewski
2019-12-11 9:07 ` Bartosz Golaszewski
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.