udelay vs usleep_range

Nicholas Mc Guire der.herr at hofr.at
Sun Sep 11 12:39:48 EDT 2016


On Sun, Sep 11, 2016 at 06:37:40PM +0200, Peter Senna Tschudin wrote:
> Hi Gargi,
> 
> On Sun, Sep 11, 2016 at 5:58 PM, Gargi Sharma <gs051095 at gmail.com> wrote:
> > 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
> 
> Which version of checkpatch are you using? Mine didn't catch that.
> 
> $ git status
> HEAD detached at next-20160909
> 
> $ ./scripts/checkpatch.pl -f ./drivers/staging/nvec/nvec.c
> total: 0 errors, 0 warnings, 988 lines checked
>

use ./scripts/checkpatch.pl -strict -f ./drivers/staging/nvec/nvec.c

to see these issues.

thx!
hofrat
 



More information about the Kernelnewbies mailing list