* [PATCH] Make irq_dispose_mapping(NO_IRQ) a nop
@ 2006-10-24 3:37 Michael Ellerman
2006-10-24 3:52 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 2+ messages in thread
From: Michael Ellerman @ 2006-10-24 3:37 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
It makes for a friendlier API if irq_dispose_mapping(NO_IRQ) is a
nop, rather than triggering a WARN_ON.
Signed-off-by: Michael Ellerman <michael@ellerman•id.au>
---
arch/powerpc/kernel/irq.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Index: git/arch/powerpc/kernel/irq.c
===================================================================
--- git.orig/arch/powerpc/kernel/irq.c
+++ git/arch/powerpc/kernel/irq.c
@@ -626,10 +626,14 @@ EXPORT_SYMBOL_GPL(irq_of_parse_and_map);
void irq_dispose_mapping(unsigned int virq)
{
- struct irq_host *host = irq_map[virq].host;
+ struct irq_host *host;
irq_hw_number_t hwirq;
unsigned long flags;
+ if (virq == NO_IRQ)
+ return;
+
+ host = irq_map[virq].host;
WARN_ON (host == NULL);
if (host == NULL)
return;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Make irq_dispose_mapping(NO_IRQ) a nop
2006-10-24 3:37 [PATCH] Make irq_dispose_mapping(NO_IRQ) a nop Michael Ellerman
@ 2006-10-24 3:52 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2006-10-24 3:52 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev, Paul Mackerras
On Tue, 2006-10-24 at 13:37 +1000, Michael Ellerman wrote:
> It makes for a friendlier API if irq_dispose_mapping(NO_IRQ) is a
> nop, rather than triggering a WARN_ON.
>
> Signed-off-by: Michael Ellerman <michael@ellerman•id.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel•crashing.org>
> ---
>
> arch/powerpc/kernel/irq.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> Index: git/arch/powerpc/kernel/irq.c
> ===================================================================
> --- git.orig/arch/powerpc/kernel/irq.c
> +++ git/arch/powerpc/kernel/irq.c
> @@ -626,10 +626,14 @@ EXPORT_SYMBOL_GPL(irq_of_parse_and_map);
>
> void irq_dispose_mapping(unsigned int virq)
> {
> - struct irq_host *host = irq_map[virq].host;
> + struct irq_host *host;
> irq_hw_number_t hwirq;
> unsigned long flags;
>
> + if (virq == NO_IRQ)
> + return;
> +
> + host = irq_map[virq].host;
> WARN_ON (host == NULL);
> if (host == NULL)
> return;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-24 3:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-24 3:37 [PATCH] Make irq_dispose_mapping(NO_IRQ) a nop Michael Ellerman
2006-10-24 3:52 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox