udelay vs usleep_range

Gargi Sharma gs051095 at gmail.com
Sun Sep 11 11:58:29 EDT 2016


Hi all,

I ran the checkpatch script over drivers/staging/nvec.c and got the
following warning

 udelay(33);

CHECK: usleep_range is preferred over udelay; see
Documentation/timers/timers-howto.txt

I checked out the timers-howto.txt and for usleep_range, one has to specify
the lower and upper limit for the timer. How does one decide what the upper
limit will be if one is to change the function from udelay to usleep_range?

Thanks!
Gargi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160911/14b83409/attachment.html 


More information about the Kernelnewbies mailing list