[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1280278119.24054.66.camel@Joe-Laptop.home>
Date: Tue, 27 Jul 2010 17:48:39 -0700
From: Joe Perches <joe@...ches.com>
To: Patrick Pannuto <ppannuto@...eaurora.org>
Cc: linux-kernel@...r.kernel.org, Andy Whitcroft <apw@...onical.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 2/4] Checkpatch: prefer usleep_range over udelay
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists