* [PATCH] staging: rts5208: Replace instances of udelay by usleep_range
@ 2022-10-18 14:04 Tanjuate Brunostar
2022-10-20 4:40 ` Joe Perches
0 siblings, 1 reply; 3+ messages in thread
From: Tanjuate Brunostar @ 2022-10-18 14:04 UTC (permalink / raw)
To: gregkh, linux-staging, linux-kernel, outreachy
Replace the use of udelay by usleep_range as suggested by checkpatch:
CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.rst
+ udelay(30);
CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.rst
+ udelay(50);
Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---
drivers/staging/rts5208/ms.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rts5208/ms.c b/drivers/staging/rts5208/ms.c
index 14449f8afad5..ae72437b5482 100644
--- a/drivers/staging/rts5208/ms.c
+++ b/drivers/staging/rts5208/ms.c
@@ -3235,7 +3235,7 @@ static int ms_write_multiple_pages(struct rtsx_chip *chip, u16 old_blk,
return STATUS_FAIL;
}
- udelay(30);
+ usleep_range(30, 30);
rtsx_init_cmd(chip);
@@ -4157,7 +4157,7 @@ int mg_set_ICV(struct scsi_cmnd *srb, struct rtsx_chip *chip)
#ifdef MG_SET_ICV_SLOW
for (i = 0; i < 2; i++) {
- udelay(50);
+ usleep_range(50, 50);
rtsx_init_cmd(chip);
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: rts5208: Replace instances of udelay by usleep_range
2022-10-18 14:04 [PATCH] staging: rts5208: Replace instances of udelay by usleep_range Tanjuate Brunostar
@ 2022-10-20 4:40 ` Joe Perches
2022-10-20 6:08 ` Tanju Brunostar
0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2022-10-20 4:40 UTC (permalink / raw)
To: Tanjuate Brunostar, gregkh, linux-staging, linux-kernel, outreachy
On Tue, 2022-10-18 at 14:04 +0000, Tanjuate Brunostar wrote:
> Replace the use of udelay by usleep_range as suggested by checkpatch:
>
> CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.rst
> + udelay(30);
[]
> diff --git a/drivers/staging/rts5208/ms.c b/drivers/staging/rts5208/ms.c
[]
> @@ -3235,7 +3235,7 @@ static int ms_write_multiple_pages(struct rtsx_chip *chip, u16 old_blk,
> return STATUS_FAIL;
> }
>
> - udelay(30);
> + usleep_range(30, 30);
This isn't useful. Please read the Documentation/timers.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: rts5208: Replace instances of udelay by usleep_range
2022-10-20 4:40 ` Joe Perches
@ 2022-10-20 6:08 ` Tanju Brunostar
0 siblings, 0 replies; 3+ messages in thread
From: Tanju Brunostar @ 2022-10-20 6:08 UTC (permalink / raw)
To: Joe Perches; +Cc: gregkh, linux-staging, linux-kernel, outreachy
On Thu, Oct 20, 2022 at 5:40 AM Joe Perches <joe@perches.com> wrote:
>
> On Tue, 2022-10-18 at 14:04 +0000, Tanjuate Brunostar wrote:
> > Replace the use of udelay by usleep_range as suggested by checkpatch:
> >
> > CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.rst
> > + udelay(30);
> []
> > diff --git a/drivers/staging/rts5208/ms.c b/drivers/staging/rts5208/ms.c
> []
> > @@ -3235,7 +3235,7 @@ static int ms_write_multiple_pages(struct rtsx_chip *chip, u16 old_blk,
> > return STATUS_FAIL;
> > }
> >
> > - udelay(30);
> > + usleep_range(30, 30);
>
> >This isn't useful. Please read the Documentation/timers.
Yes I read the documentation and realized the changes were not necessary
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-20 6:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-18 14:04 [PATCH] staging: rts5208: Replace instances of udelay by usleep_range Tanjuate Brunostar
2022-10-20 4:40 ` Joe Perches
2022-10-20 6:08 ` Tanju Brunostar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).