Skip to contentSkip to conversation

ARM: irq: avoid NULL check in for_each_irq_desc loop

PATCH New Will Deacon 1 participant 1 message Jan 19, 2012 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: irq: avoid NULL check in for_each_irq_desc loop

ARM unconditionally selects CONFIG_GENERIC_HARDIRQS, so the definition of for_each_irq_desc will check that the desc is non-NULL anyway.

This patch removes a redundant check from the IRQ migration code.

---
 arch/arm/kernel/irq.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
arch/arm/kernel/irq.c +1 -4
index 831435d..95ea88f 100644
@@ -181,10 +181,7 @@ void migrate_irqs(void)
 	local_irq_save(flags);
 
 	for_each_irq_desc(i, desc) {
-		bool affinity_broken = false;
-
-		if (!desc)
-			continue;
+		bool affinity_broken;
 
 		raw_spin_lock(&desc->lock);
 		affinity_broken = migrate_one_irq(desc);
Signature · 1 line
1.7.4.1