Messages in this thread | | | Date | Wed, 18 Oct 2023 05:38:07 +0200 | From | Andi Shyti <> | 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@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
| |