Thread (47 messages) 47 messages, 2 authors, 2024-07-03

Re: [PATCH 12/25] irqchip/armada-370-xp: Use !virq instead of virq == 0

From: Andrew Lunn <andrew@lunn.ch>
Date: 2024-07-01 22:27:31

On Mon, Jul 01, 2024 at 07:02:36PM +0200, Marek Behún wrote:
quoted hunk ↗ jump to hunk
Use !virq instead of virq == 0 when checking for availability of the
virq.

Signed-off-by: Marek Behún <kabel@kernel.org>
---
 drivers/irqchip/irq-armada-370-xp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
index d8b0609a9160..afd3a9c5b40c 100644
--- a/drivers/irqchip/irq-armada-370-xp.c
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -539,7 +539,7 @@ static void armada_xp_mpic_reenable_percpu(void)
 		int virq;
 
 		virq = irq_linear_revmap(armada_370_xp_mpic_domain, irq);
-		if (virq == 0)
+		if (!virq)
 			continue;
 
 		data = irq_get_irq_data(virq);
@@ -734,7 +734,7 @@ static void armada_370_xp_mpic_resume(void)
 		int virq;
 
 		virq = irq_linear_revmap(armada_370_xp_mpic_domain, irq);
-		if (virq == 0)
+		if (!virq)
 			continue;
  
More examples where int could become unsigned int. Maybe that happens
in a later patch?

   Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help