]> git.karo-electronics.de Git - karo-tx-linux.git/commit
checkpatch: optimise statement scanner when mid-statement
authorAndy Whitcroft <apw@canonical.com>
Thu, 8 Dec 2011 04:42:23 +0000 (15:42 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 9 Dec 2011 04:52:45 +0000 (15:52 +1100)
commite79414078b26cae134991137164410676827cec9
tree1f29804fe872bc860c0d42d53af8ebc58cfc3137
parentde695f7fb8dc746784901fa7ff56a737ad2bf99e
checkpatch: optimise statement scanner when mid-statement

In the middle of a long definition or similar, there is no possibility of
finding a smaller sub-statement.  Optimise this case by skipping statement
aquirey where there are no starts of statement (open brace '{' or
semi-colon ';').  We are likely to scan slightly more than needed still
but this is safest.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/checkpatch.pl