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

Andrew Lunn andrew at lunn.ch
Mon Jul 1 15:27:09 PDT 2024


On Mon, Jul 01, 2024 at 07:02:36PM +0200, Marek Behún wrote:
> Use !virq instead of virq == 0 when checking for availability of the
> virq.
> 
> Signed-off-by: Marek Behún <kabel at 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



More information about the linux-arm-kernel mailing list