* [PATCH] irqchip/s3c24xx: Remove unneeded comparison of unsigned long to 0
@ 2018-08-13 15:11 Krzysztof Kozlowski
2018-08-13 15:21 ` Marc Zyngier
0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2018-08-13 15:11 UTC (permalink / raw)
To: linux-arm-kernel
irq_data->hwirq is unsigned long. This fixes GCC warning:
drivers/irqchip/irq-s3c24xx.c: In function 's3c_irqext0_type':
drivers/irqchip/irq-s3c24xx.c:253:19: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
if ((data->hwirq >= 0) && (data->hwirq <= 3)) {
^~
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/irqchip/irq-s3c24xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-s3c24xx.c b/drivers/irqchip/irq-s3c24xx.c
index f6fd57ebe6e6..c19766fe8a1a 100644
--- a/drivers/irqchip/irq-s3c24xx.c
+++ b/drivers/irqchip/irq-s3c24xx.c
@@ -250,7 +250,7 @@ static int s3c_irqext0_type(struct irq_data *data, unsigned int type)
void __iomem *gpcon_reg;
unsigned long gpcon_offset, extint_offset;
- if ((data->hwirq >= 0) && (data->hwirq <= 3)) {
+ if (data->hwirq <= 3) {
gpcon_reg = S3C2410_GPFCON;
extint_reg = S3C24XX_EXTINT0;
gpcon_offset = (data->hwirq) * 2;
--
2.14.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] irqchip/s3c24xx: Remove unneeded comparison of unsigned long to 0
2018-08-13 15:11 [PATCH] irqchip/s3c24xx: Remove unneeded comparison of unsigned long to 0 Krzysztof Kozlowski
@ 2018-08-13 15:21 ` Marc Zyngier
0 siblings, 0 replies; 2+ messages in thread
From: Marc Zyngier @ 2018-08-13 15:21 UTC (permalink / raw)
To: linux-arm-kernel
On 13/08/18 16:11, Krzysztof Kozlowski wrote:
> irq_data->hwirq is unsigned long. This fixes GCC warning:
>
> drivers/irqchip/irq-s3c24xx.c: In function 's3c_irqext0_type':
> drivers/irqchip/irq-s3c24xx.c:253:19: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
> if ((data->hwirq >= 0) && (data->hwirq <= 3)) {
> ^~
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
> drivers/irqchip/irq-s3c24xx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/irqchip/irq-s3c24xx.c b/drivers/irqchip/irq-s3c24xx.c
> index f6fd57ebe6e6..c19766fe8a1a 100644
> --- a/drivers/irqchip/irq-s3c24xx.c
> +++ b/drivers/irqchip/irq-s3c24xx.c
> @@ -250,7 +250,7 @@ static int s3c_irqext0_type(struct irq_data *data, unsigned int type)
> void __iomem *gpcon_reg;
> unsigned long gpcon_offset, extint_offset;
>
> - if ((data->hwirq >= 0) && (data->hwirq <= 3)) {
> + if (data->hwirq <= 3) {
> gpcon_reg = S3C2410_GPFCON;
> extint_reg = S3C24XX_EXTINT0;
> gpcon_offset = (data->hwirq) * 2;
>
Queued, thanks.
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-13 15:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-13 15:11 [PATCH] irqchip/s3c24xx: Remove unneeded comparison of unsigned long to 0 Krzysztof Kozlowski
2018-08-13 15:21 ` Marc Zyngier
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).