staging: wfx: Replace udelay() by usleep_range() in bh.c
PATCH 1/1 staging: wfx: Replace udelay() by usleep_range() in bh.c
Replace udelay() by usleep_range() in bh.c according to checkpatch
message: "CHECK: usleep_range is preferred over udelay"
--- drivers/staging/wfx/bh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wfx/bh.c +1 -1
@@ -315,7 +315,7 @@ void wfx_bh_poll_irq(struct wfx_dev *wdev)dev_err (wdev->dev,"time out while polling control register\n" );return ; } -udelay (200 ); +usleep_range (200 ,300 ); }wfx_bh_request_rx (wdev); }
Signature · 1 line
2.30.2
Greg KH
maintainerQuoted 13 lines · Fabio M. De Francesco
Replace
udelay()byusleep_range()inbh.caccording to checkpatch
message: "CHECK:usleep_rangeis preferred over udelay"Signed-off-by Fabio M. De Francesco <[email protected]>--- drivers/staging/wfx/bh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/wfx/bh.c +0
-0
drivers/staging/wfx/bh.c void wfx_bh_poll_irq(struct wfx_dev *wdev) · line 318
Quoted 5 lines
drivers/staging/wfx/bh.c +1
-1@@ -315,7 +315,7 @@ void wfx_bh_poll_irq(struct wfx_dev *wdev)dev_err (wdev->dev,"time out while polling control register\n" );return ; } -udelay (200 ); +usleep_range (200 ,300 );
Do you know that this range is safe to use? This type of change needs to be tested on a device itself.
thanks,
greg k-h
Thanks for your prompt reply. No, I don't know it for sure. I've just read some drivers and found that often the maximum time is about 150% of the minimum. I assumed (wrongly) that it was safe.
Can I leave usleep_range() with 200 usec for min and max time, as it was with udelay(), and let the maintainer to take care of the numbers?
Kind regards,
Fabio
Quoted 27 lines · Greg KH
Quoted 13 lines · Fabio M. De Francesco
Replace
udelay()byusleep_range()inbh.caccording to checkpatch
message: "CHECK:usleep_rangeis preferred over udelay"Signed-off-by Fabio M. De Francesco <[email protected]>--- drivers/staging/wfx/bh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/wfx/bh.c +0
-0drivers/staging/wfx/bh.c void wfx_bh_poll_irq(struct wfx_dev *wdev) · line 318
Quoted 5 lines
drivers/staging/wfx/bh.c +1
-1@@ -315,7 +315,7 @@ void wfx_bh_poll_irq(struct wfx_dev *wdev)dev_err (wdev->dev,"time out while polling control register\n" );return ; } -udelay (200 ); +usleep_range (200 ,300 );Do you know that this range is safe to use? This type of change needs to be tested on a device itself.
thanks,
greg k-h
Greg KH
maintainerA: http://en.wikipedia.org/wiki/Top_post
Q: Were do I find info about this thing called top-posting?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
A: No.
Q: Should I include quotations after my reply?
http://daringfireball.net/2007/07/on_top
Quoted 6 lines · FMDF
Thanks for your prompt reply. No, I don't know it for sure. I've just read some drivers and found that often the maximum time is about 150% of the minimum. I assumed (wrongly) that it was safe.
Can I leave
usleep_range()with 200 usec for min and max time, as it was withudelay(), and let the maintainer to take care of the numbers?
I would just leave it as-is for now, no need to change it.
thanks,
greg k-h