lkml.org 
[lkml]   [2023]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@gmail.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

\
 
 \ /
  Last update: 2023-10-18 05:39    [W:0.091 / U:2.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site