On 09:41-20250309, Thomas Gleixner wrote:
> Convert the code to use the new guard(msi_descs_lock).
> 
> No functional change intended.
> 
> Signed-off-by: Thomas Gleixner <t...@linutronix.de>
> Cc: Nishanth Menon <n...@ti.com>
> Cc: Tero Kristo <kri...@kernel.org>
> Cc: Santosh Shilimkar <ssant...@kernel.org>
> ---
>  drivers/soc/ti/ti_sci_inta_msi.c |   10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> --- a/drivers/soc/ti/ti_sci_inta_msi.c
> +++ b/drivers/soc/ti/ti_sci_inta_msi.c
> @@ -103,19 +103,15 @@ int ti_sci_inta_msi_domain_alloc_irqs(st
>       if (ret)
>               return ret;
>  
> -     msi_lock_descs(dev);
> +     guard(msi_descs_lock)(dev);
>       nvec = ti_sci_inta_msi_alloc_descs(dev, res);
> -     if (nvec <= 0) {
> -             ret = nvec;
> -             goto unlock;
> -     }
> +     if (nvec <= 0)
> +             return nvec;
>  
>       /* Use alloc ALL as it's unclear whether there are gaps in the indices 
> */
>       ret = msi_domain_alloc_irqs_all_locked(dev, MSI_DEFAULT_DOMAIN, nvec);
>       if (ret)
>               dev_err(dev, "Failed to allocate IRQs %d\n", ret);
> -unlock:
> -     msi_unlock_descs(dev);
>       return ret;
>  }
>  EXPORT_SYMBOL_GPL(ti_sci_inta_msi_domain_alloc_irqs);
> 

Quick test of the series for basic NFS boot (which uses INTR/INTA MSI
for Ethernet) on TI K3 platforms against linux-next:
https://gist.github.com/nmenon/26ea6eb530de34808ab04b1958a0b28b

Tested-by: Nishanth Menon <n...@ti.com>

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 
849D 1736 249D

Reply via email to