Re: [PATCH] staging: rts5208: Replace delay function.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> ---
>  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




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux