* [PATCH] arch/unicore32/kernel/dma.c: eliminated unneeded free_irq
@ 2012-03-15 8:01 Julia Lawall
2012-03-15 8:09 ` walter harms
2012-03-15 8:38 ` Guan Xuetao
0 siblings, 2 replies; 3+ messages in thread
From: Julia Lawall @ 2012-03-15 8:01 UTC (permalink / raw)
To: Guan Xuetao; +Cc: kernel-janitors, linux-kernel
From: Julia Lawall <Julia.Lawall@lip6.fr>
The device remains functional if the second request_irq fails, so the first
one should not be freed.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
diff --git a/arch/unicore32/kernel/dma.c b/arch/unicore32/kernel/dma.c
index ae441bc..6184ff2 100644
--- a/arch/unicore32/kernel/dma.c
+++ b/arch/unicore32/kernel/dma.c
@@ -172,8 +172,9 @@ int __init puv3_init_dma(void)
ret = request_irq(IRQ_DMAERR, dma_err_handler, 0, "DMAERR", NULL);
if (ret) {
+ /* the device remains function if this fails, so don't free
+ the previously allocated irq */
printk(KERN_CRIT "Can't register IRQ for DMAERR\n");
- free_irq(IRQ_DMA, "DMA");
return ret;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] arch/unicore32/kernel/dma.c: eliminated unneeded free_irq
2012-03-15 8:01 [PATCH] arch/unicore32/kernel/dma.c: eliminated unneeded free_irq Julia Lawall
@ 2012-03-15 8:09 ` walter harms
2012-03-15 8:38 ` Guan Xuetao
1 sibling, 0 replies; 3+ messages in thread
From: walter harms @ 2012-03-15 8:09 UTC (permalink / raw)
To: Julia Lawall; +Cc: Guan Xuetao, kernel-janitors, linux-kernel
Am 15.03.2012 09:01, schrieb Julia Lawall:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> The device remains functional if the second request_irq fails, so the first
> one should not be freed.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> diff --git a/arch/unicore32/kernel/dma.c b/arch/unicore32/kernel/dma.c
> index ae441bc..6184ff2 100644
> --- a/arch/unicore32/kernel/dma.c
> +++ b/arch/unicore32/kernel/dma.c
> @@ -172,8 +172,9 @@ int __init puv3_init_dma(void)
>
> ret = request_irq(IRQ_DMAERR, dma_err_handler, 0, "DMAERR", NULL);
> if (ret) {
> + /* the device remains function if this fails, so don't free
> + the previously allocated irq */
> printk(KERN_CRIT "Can't register IRQ for DMAERR\n");
> - free_irq(IRQ_DMA, "DMA");
> return ret;
> }
>
obviously we had the same idea ... i did not see that her it came in the moment i send my reply
sorry for the noise,
re,
wh
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] arch/unicore32/kernel/dma.c: eliminated unneeded free_irq
2012-03-15 8:01 [PATCH] arch/unicore32/kernel/dma.c: eliminated unneeded free_irq Julia Lawall
2012-03-15 8:09 ` walter harms
@ 2012-03-15 8:38 ` Guan Xuetao
1 sibling, 0 replies; 3+ messages in thread
From: Guan Xuetao @ 2012-03-15 8:38 UTC (permalink / raw)
To: Julia Lawall; +Cc: kernel-janitors, linux-kernel
On Thu, 2012-03-15 at 09:01 +0100, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> The device remains functional if the second request_irq fails, so the first
> one should not be freed.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Thanks,
Guan Xuetao
>
> ---
> diff --git a/arch/unicore32/kernel/dma.c b/arch/unicore32/kernel/dma.c
> index ae441bc..6184ff2 100644
> --- a/arch/unicore32/kernel/dma.c
> +++ b/arch/unicore32/kernel/dma.c
> @@ -172,8 +172,9 @@ int __init puv3_init_dma(void)
>
> ret = request_irq(IRQ_DMAERR, dma_err_handler, 0, "DMAERR", NULL);
> if (ret) {
> + /* the device remains function if this fails, so don't free
> + the previously allocated irq */
> printk(KERN_CRIT "Can't register IRQ for DMAERR\n");
> - free_irq(IRQ_DMA, "DMA");
> return ret;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-15 8:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-15 8:01 [PATCH] arch/unicore32/kernel/dma.c: eliminated unneeded free_irq Julia Lawall
2012-03-15 8:09 ` walter harms
2012-03-15 8:38 ` Guan Xuetao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox