lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <174403631040.31282.6425329734954381811.tip-bot2@tip-bot2>
Date: Mon, 07 Apr 2025 14:31:50 -0000
From: "tip-bot2 for Thomas Gleixner" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Thomas Gleixner <tglx@...utronix.de>, Nishanth Menon <nm@...com>,
 Jonathan Cameron <Jonathan.Cameron@...wei.com>, Dhruva Gole <d-gole@...com>,
 x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: irq/msi] soc: ti: ti_sci_inta_msi: Switch MSI descriptor
 locking to guard()

The following commit has been merged into the irq/msi branch of tip:

Commit-ID:     d70d21788a602dc9cdd154320e92f1b97e9f4e0f
Gitweb:        https://git.kernel.org/tip/d70d21788a602dc9cdd154320e92f1b97e9f4e0f
Author:        Thomas Gleixner <tglx@...utronix.de>
AuthorDate:    Wed, 19 Mar 2025 11:56:42 +01:00
Committer:     Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Mon, 07 Apr 2025 16:24:55 +02:00

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@...utronix.de>
Tested-by: Nishanth Menon <nm@...com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Reviewed-by: Dhruva Gole <d-gole@...com>
Link: https://lore.kernel.org/all/20250319105506.203802081@linutronix.de



---
 drivers/soc/ti/ti_sci_inta_msi.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/soc/ti/ti_sci_inta_msi.c b/drivers/soc/ti/ti_sci_inta_msi.c
index c363645..193266f 100644
--- 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(struct device *dev,
 	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);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ