Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

soc: ti: ti_sci_inta_msi: Switch MSI descriptor locking to guard()

Convert the code to use the new guard(msi_descs_lock).

No functional change intended.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Link: https://lore.kernel.org/all/20250319105506.203802081@linutronix.de



+3 -7
+3 -7
drivers/soc/ti/ti_sci_inta_msi.c
··· 103 103 if (ret) 104 104 return ret; 105 105 106 - msi_lock_descs(dev); 106 + guard(msi_descs_lock)(dev); 107 107 nvec = ti_sci_inta_msi_alloc_descs(dev, res); 108 - if (nvec <= 0) { 109 - ret = nvec; 110 - goto unlock; 111 - } 108 + if (nvec <= 0) 109 + return nvec; 112 110 113 111 /* Use alloc ALL as it's unclear whether there are gaps in the indices */ 114 112 ret = msi_domain_alloc_irqs_all_locked(dev, MSI_DEFAULT_DOMAIN, nvec); 115 113 if (ret) 116 114 dev_err(dev, "Failed to allocate IRQs %d\n", ret); 117 - unlock: 118 - msi_unlock_descs(dev); 119 115 return ret; 120 116 } 121 117 EXPORT_SYMBOL_GPL(ti_sci_inta_msi_domain_alloc_irqs);