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] [day] [month] [year] [list]
Message-ID: <20251220100923.2a3de6db@pumpkin>
Date: Sat, 20 Dec 2025 10:09:23 +0000
From: David Laight <david.laight.linux@...il.com>
To: Preyas <preyas17@...omail.in>
Cc: marvin24@....de, gregkh@...uxfoundation.org, ac100@...ts.launchpad.net,
 linux-tegra@...r.kernel.org, linux-staging@...ts.linux.dev,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: nvec: replace short udelay with usleep_range

On Sat, 20 Dec 2025 09:22:29 +0000
Preyas <preyas17@...omail.in> wrote:

> From: Preyas Sharma <preyas17@...omail.in>
> 
> Signed-off-by: Preyas Sharma <preyas17@...omail.in>
> ---
>  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..6ffe5e8656d1 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, 66);

Given its name the function looks like an ISR - where you can't sleep.
Spinning isn't a good idea either....

	David

>  			if (nvec->rx->data[0] != 0x01) {
>  				dev_err(nvec->dev,
>  					"Read without prior read command\n");


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ