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]
Date:   Wed, 18 Oct 2023 05:38:07 +0200
From:   Andi Shyti <andi.shyti@...ux.intel.com>
To:     kenechukwu maduechesi <maduechesik@...il.com>
Cc:     outreachy@...ts.linux.dev, shreeya.patel23498@...il.com,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: rts5208: Replace delay function.

Hi Kenechukwu,

On Tue, Oct 17, 2023 at 06:03:05PM -0700, kenechukwu maduechesi wrote:
> Replace udelay() with usleep_range() for more precise delay handling.

The reason is not the precise handling, quite the opposite.

> Reported by checkpatch:
> 
> CHECK: usleep_range is preferred over udelay

Can you tell why?[*]

> Signed-off-by: kenechukwu maduechesi <maduechesik@...il.com>
> ---
>  drivers/staging/rts5208/sd.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c
> index 74c4f476b3a4..059f99b0a727 100644
> --- a/drivers/staging/rts5208/sd.c
> +++ b/drivers/staging/rts5208/sd.c
> @@ -865,7 +865,7 @@ static int sd_change_phase(struct rtsx_chip *chip, u8 sample_point, u8 tune_dir)
>  						     PHASE_CHANGE);
>  			if (retval)
>  				return retval;
> -			udelay(50);
> +			usleep_range(50);

What is the range you will be sleeping, now?

Andi

[*] Documentation/timers/timers-howto.rst

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ