public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dma/ipu: change ipu_irq_handler() to remove compile warning
@ 2015-08-25  8:01 yalin wang
  2015-08-25  8:07 ` Thomas Gleixner
  2015-08-28  4:33 ` Vinod Koul
  0 siblings, 2 replies; 5+ messages in thread
From: yalin wang @ 2015-08-25  8:01 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams, tglx, robh, jiang.liu, yalin.wang2010,
	dmaengine, linux-kernel

Change ipu_irq_handler() to avoid gcc warning:

drivers/dma/ipu/ipu_irq.c:305:4: warning: 'irq' may be used
uninitialized in this function [-Wmaybe-uninitialized]
    generic_handle_irq(irq);

Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
---
 drivers/dma/ipu/ipu_irq.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/ipu/ipu_irq.c b/drivers/dma/ipu/ipu_irq.c
index 7489d2a..1a74eee 100644
--- a/drivers/dma/ipu/ipu_irq.c
+++ b/drivers/dma/ipu/ipu_irq.c
@@ -286,23 +286,21 @@ static void ipu_irq_handler(unsigned int __irq, struct irq_desc *desc)
 		raw_spin_unlock(&bank_lock);
 		while ((line = ffs(status))) {
 			struct ipu_irq_map *map;
-			unsigned int irq;
 
 			line--;
 			status &= ~(1UL << line);
 
 			raw_spin_lock(&bank_lock);
 			map = src2map(32 * i + line);
-			if (map)
-				irq = map->irq;
 			raw_spin_unlock(&bank_lock);
 
 			if (!map) {
 				pr_err("IPU: Interrupt on unmapped source %u bank %d\n",
 				       line, i);
 				continue;
+			} else {
+				generic_handle_irq(map->irq);
 			}
-			generic_handle_irq(irq);
 		}
 	}
 }
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-08-28  4:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-25  8:01 [PATCH] dma/ipu: change ipu_irq_handler() to remove compile warning yalin wang
2015-08-25  8:07 ` Thomas Gleixner
2015-08-25  8:16   ` yalin wang
2015-08-28  4:33 ` Vinod Koul
2015-08-28  4:34   ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox