Re: [PATCH] sparc/irq: Remove unneeded if check in sun4v_cookie_only_virqs()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Thorsten,

On Tue, 2025-01-14 at 21:25 +0100, Thorsten Blum wrote:
> Remove the unnecessary if check and return the result directly.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
> ---
>  arch/sparc/kernel/irq_64.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c
> index aff0d24f8c6f..81fb49b089a8 100644
> --- a/arch/sparc/kernel/irq_64.c
> +++ b/arch/sparc/kernel/irq_64.c
> @@ -146,9 +146,7 @@ static int hv_irq_version;
>   */
>  static bool sun4v_cookie_only_virqs(void)
>  {
> -	if (hv_irq_version >= 3)
> -		return true;
> -	return false;
> +	return hv_irq_version >= 3;
>  }
>  
>  static void __init irq_init_hv(void)

I'm not sure whether this change is really necessary nor will it improve
the readability of the code. I think the compiler will optimize the code
the same way, for both variants.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913





[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux