diff mbox series

[v2,08/30] irqchip/armada-370-xp: Simplify is_percpu_irq() code

Message ID 20240702114302.22475-9-kabel@kernel.org (mailing list archive)
State Superseded
Headers show
Series armada-370-xp irqchip updates round 2 | expand

Commit Message

Marek Behún July 2, 2024, 11:42 a.m. UTC
Simplify the code in the is_percpu_irq() function. Instead of
  if (condition)
    return true;
  return false;
simply return condition.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---
 drivers/irqchip/irq-armada-370-xp.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Ilpo Järvinen July 6, 2024, 9:42 a.m. UTC | #1
On Tue, 2 Jul 2024, Marek Behún wrote:

> Simplify the code in the is_percpu_irq() function. Instead of
>   if (condition)
>     return true;
>   return false;
> simply return condition.
> 
> Signed-off-by: Marek Behún <kabel@kernel.org>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> ---
>  drivers/irqchip/irq-armada-370-xp.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
> index b9631cc25c0b..cfd6dc803150 100644
> --- a/drivers/irqchip/irq-armada-370-xp.c
> +++ b/drivers/irqchip/irq-armada-370-xp.c
> @@ -201,10 +201,7 @@ static inline unsigned int msi_doorbell_end(void)
>  
>  static inline bool is_percpu_irq(irq_hw_number_t irq)
>  {
> -	if (irq <= MPIC_MAX_PER_CPU_IRQS)
> -		return true;
> -
> -	return false;
> +	return irq <= MPIC_MAX_PER_CPU_IRQS;
>  }
>  
>  /*
> 

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
diff mbox series

Patch

diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
index b9631cc25c0b..cfd6dc803150 100644
--- a/drivers/irqchip/irq-armada-370-xp.c
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -201,10 +201,7 @@  static inline unsigned int msi_doorbell_end(void)
 
 static inline bool is_percpu_irq(irq_hw_number_t irq)
 {
-	if (irq <= MPIC_MAX_PER_CPU_IRQS)
-		return true;
-
-	return false;
+	return irq <= MPIC_MAX_PER_CPU_IRQS;
 }
 
 /*