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-next>] [day] [month] [year] [list]
Message-ID: <20251224111651.217679-1-sshadowmonkeyy@gmail.com>
Date: Wed, 24 Dec 2025 12:16:51 +0100
From: ShadowMonkee <sshadowmonkeyy@...il.com>
To: Marc Dietrich <marvin24@....de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: ac100@...ts.launchpad.net,
	linux-tegra@...r.kernel.org,
	linux-staging@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	ShadowMonkee <sshadowmonkeyy@...il.com>
Subject: [PATCH] staging: nvec: replace udelay with usleep_range

udelay() was used for a short delay in the NVEC I2C receive path.
Replace it with usleep_range(), which is preferred as it avoids
busy-waiting and allows the scheduler to run other tasks.

Signed-off-by: ShadowMonkee <sshadowmonkeyy@...il.com>
---
 drivers/staging/nvec/nvec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 263774e6a78c..dd92f186e0db 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -648,7 +648,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
 		break;
 	case 2:		/* first byte after command */
 		if (status == (I2C_SL_IRQ | RNW | RCVD)) {
-			udelay(33);
+			usleep_range(33, 34);
 			if (nvec->rx->data[0] != 0x01) {
 				dev_err(nvec->dev,
 					"Read without prior read command\n");
-- 
2.52.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ