Messages in this thread |  | | | Subject | Re: [PATCH 2/4] Checkpatch: prefer usleep_range over udelay | | From | Joe Perches <> | | Date | Tue, 27 Jul 2010 17:48:39 -0700 |
| |
On Tue, 2010-07-27 at 15:39 -0700, Patrick Pannuto wrote: > When possible, sleeping is (usually) better than delaying, > however, don't bother callers of udelay < 10us, as those > cases are not with the switch to usleep_range > +# prefer usleep_range over udelay > + if ($line =~ /\budelay\s*\((.+)\);/) { > + # ignore udelay's < 10, however
This doesn't handle these cases:
udelay(MY_DEFINED_DELAY) udelay( 100 )
Shouldn't this be:
if (($line =~ /\budelay\s*\(\s*(\w+)\s*\)/ { WARN("usleep_range is preferred over udelay; see Documentation/timers/delays.txt\n" . $line); Maybe these should be converted from WARN to CHK
|  |