* [PATCH 1/1] Use NO_IRQ not IRQ_NONE
@ 2007-06-01 7:23 Michael Ellerman
2007-06-01 7:47 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 3+ messages in thread
From: Michael Ellerman @ 2007-06-01 7:23 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
There is a thinko in the irq code, it uses IRQ_NONE to indicate no irq,
whereas it should be using NO_IRQ. IRQ_NONE is returned from irq handlers
to say "not handled".
As it happens they currently have the same value (0), so this is just for
future proof-ness.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/kernel/irq.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 068377a..42c8ed6 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -489,7 +489,7 @@ struct irq_host *irq_alloc_host(unsigned int revmap_type,
case IRQ_HOST_MAP_LINEAR:
rmap = (unsigned int *)(host + 1);
for (i = 0; i < revmap_arg; i++)
- rmap[i] = IRQ_NONE;
+ rmap[i] = NO_IRQ;
host->revmap_data.linear.size = revmap_arg;
smp_wmb();
host->revmap_data.linear.revmap = rmap;
@@ -614,7 +614,7 @@ unsigned int irq_create_mapping(struct irq_host *host,
* host->ops->map() to update the flags
*/
virq = irq_find_mapping(host, hwirq);
- if (virq != IRQ_NONE) {
+ if (virq != NO_IRQ) {
if (host->ops->remap)
host->ops->remap(host, virq, hwirq);
pr_debug("irq: -> existing mapping on virq %d\n", virq);
@@ -741,7 +741,7 @@ void irq_dispose_mapping(unsigned int virq)
switch(host->revmap_type) {
case IRQ_HOST_MAP_LINEAR:
if (hwirq < host->revmap_data.linear.size)
- host->revmap_data.linear.revmap[hwirq] = IRQ_NONE;
+ host->revmap_data.linear.revmap[hwirq] = NO_IRQ;
break;
case IRQ_HOST_MAP_TREE:
/* Check if radix tree allocated yet */
--
1.5.1.3.g7a33b
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] Use NO_IRQ not IRQ_NONE
2007-06-01 7:23 [PATCH 1/1] Use NO_IRQ not IRQ_NONE Michael Ellerman
@ 2007-06-01 7:47 ` Benjamin Herrenschmidt
2007-06-01 16:18 ` Linas Vepstas
0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2007-06-01 7:47 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev, Paul Mackerras
On Fri, 2007-06-01 at 17:23 +1000, Michael Ellerman wrote:
> There is a thinko in the irq code, it uses IRQ_NONE to indicate no irq,
> whereas it should be using NO_IRQ. IRQ_NONE is returned from irq handlers
> to say "not handled".
>
> As it happens they currently have the same value (0), so this is just for
> future proof-ness.
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
My fault actually :-) Mostly a typo, it's right elsewhere in the code
except in those 3 occurences. Brown paper bag time for me.
Cheers,
Ben.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] Use NO_IRQ not IRQ_NONE
2007-06-01 7:47 ` Benjamin Herrenschmidt
@ 2007-06-01 16:18 ` Linas Vepstas
0 siblings, 0 replies; 3+ messages in thread
From: Linas Vepstas @ 2007-06-01 16:18 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Paul Mackerras
On Fri, Jun 01, 2007 at 05:47:32PM +1000, Benjamin Herrenschmidt wrote:
> My fault actually :-) Mostly a typo, it's right elsewhere in the code
> except in those 3 occurences. Brown paper bag time for me.
Trying to make the rest of us look bad? By those standards,
I'd be wearing 23 brown paper bags at the same time, all the time.
--linas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-06-01 16:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-01 7:23 [PATCH 1/1] Use NO_IRQ not IRQ_NONE Michael Ellerman
2007-06-01 7:47 ` Benjamin Herrenschmidt
2007-06-01 16:18 ` Linas Vepstas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox