]> git.baikalelectronics.ru Git - kernel.git/commit
checkpatch: optimise statement scanner when mid-statement
authorAndy Whitcroft <apw@canonical.com>
Tue, 10 Jan 2012 23:10:01 +0000 (15:10 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Jan 2012 00:30:50 +0000 (16:30 -0800)
commit80ebbc3d69eff3539eb02b2c67fdfcc28233d9f2
treefc35a9ca8593ddd2bf0e07ceb2f39e83ff06ff4c
parent21bca9b2e9fa60ee3bb9b4758544133c5298e5bc
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl