* [PATCH] rb532: fix irq number check in rb532_set_type
@ 2009-05-27 12:14 Florian Fainelli
2009-05-27 13:15 ` Ralf Baechle
0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2009-05-27 12:14 UTC (permalink / raw)
To: ralf, linux-mips
We only have 14 GPIO interrupt sources numbered
from 0 to 13. Therefore the check against irq_nr
in rb532_set_type is off-by-one. This fixes a mistake
introduced by commit 1b4f571632ffb0caa4170d886694f2555c0d9a4b.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/arch/mips/rb532/irq.c b/arch/mips/rb532/irq.c
index 8ac4372..f078820 100644
--- a/arch/mips/rb532/irq.c
+++ b/arch/mips/rb532/irq.c
@@ -175,7 +175,7 @@ static int rb532_set_type(unsigned int irq_nr, unsigned type)
int gpio = irq_nr - GPIO_MAPPED_IRQ_BASE;
int group = irq_to_group(irq_nr);
- if (group != GPIO_MAPPED_IRQ_GROUP || irq_nr >= (GROUP4_IRQ_BASE + 13))
+ if (group != GPIO_MAPPED_IRQ_GROUP || irq_nr > (GROUP4_IRQ_BASE + 13))
return (type == IRQ_TYPE_LEVEL_HIGH) ? 0 : -EINVAL;
switch (type) {
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] rb532: fix irq number check in rb532_set_type
2009-05-27 12:14 [PATCH] rb532: fix irq number check in rb532_set_type Florian Fainelli
@ 2009-05-27 13:15 ` Ralf Baechle
2009-05-28 10:37 ` Florian Fainelli
0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2009-05-27 13:15 UTC (permalink / raw)
To: Florian Fainelli; +Cc: linux-mips
On Wed, May 27, 2009 at 02:14:06PM +0200, Florian Fainelli wrote:
> We only have 14 GPIO interrupt sources numbered
> from 0 to 13. Therefore the check against irq_nr
> in rb532_set_type is off-by-one. This fixes a mistake
> introduced by commit 1b4f571632ffb0caa4170d886694f2555c0d9a4b.
Thanks; I've folded this patch into your old patch.
A note on commit IDs on the -queue tree. The -queue tree is really
maintained in quilt and respun every time I change any of the commits
on it. This means the commit IDs will also change, so they should be
considered volatile.
Ralf
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rb532: fix irq number check in rb532_set_type
2009-05-27 13:15 ` Ralf Baechle
@ 2009-05-28 10:37 ` Florian Fainelli
0 siblings, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2009-05-28 10:37 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips
Le Wednesday 27 May 2009 15:15:35 Ralf Baechle, vous avez écrit :
> On Wed, May 27, 2009 at 02:14:06PM +0200, Florian Fainelli wrote:
> > We only have 14 GPIO interrupt sources numbered
> > from 0 to 13. Therefore the check against irq_nr
> > in rb532_set_type is off-by-one. This fixes a mistake
> > introduced by commit 1b4f571632ffb0caa4170d886694f2555c0d9a4b.
>
> Thanks; I've folded this patch into your old patch.
Thank you !
>
> A note on commit IDs on the -queue tree. The -queue tree is really
> maintained in quilt and respun every time I change any of the commits
> on it. This means the commit IDs will also change, so they should be
> considered volatile.
I will take that into account next time, thanks for fixing this.
--
Best regards, Florian Fainelli
Email : florian@openwrt.org
http://openwrt.org
-------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-05-28 10:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-27 12:14 [PATCH] rb532: fix irq number check in rb532_set_type Florian Fainelli
2009-05-27 13:15 ` Ralf Baechle
2009-05-28 10:37 ` Florian Fainelli
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).