kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: gs051095@gmail.com (Gargi Sharma)
To: kernelnewbies@lists.kernelnewbies.org
Subject: udelay vs usleep_range
Date: Sun, 11 Sep 2016 21:28:29 +0530	[thread overview]
Message-ID: <CAOCi2DEXoxZSmTSAubGuX9m4RDrqt109ed5JKrinWQO=4pky2g@mail.gmail.com> (raw)

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 

             reply	other threads:[~2016-09-11 15:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-11 15:58 Gargi Sharma [this message]
2016-09-11 16:33 ` udelay vs usleep_range Nicholas Mc Guire
2016-09-11 16:37 ` Peter Senna Tschudin
2016-09-11 16:39   ` Nicholas Mc Guire
2016-09-11 16:48   ` Nicholas Mc Guire

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOCi2DEXoxZSmTSAubGuX9m4RDrqt109ed5JKrinWQO=4pky2g@mail.gmail.com' \
    --to=gs051095@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).