checkpatch: improve octal permissions test speed
authorJoe Perches <joe@perches.com>
Thu, 3 Apr 2014 21:49:24 +0000 (14:49 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Apr 2014 23:21:14 +0000 (16:21 -0700)
commit515a235ef9bcd31faa672740720936b22fa99c0e
tree3a9521bd77bf873f618103f2b345cc1dc58a17b2
parentdaa8b0592ee062583b2532bf62450c15fbcc7f98
checkpatch: improve octal permissions test speed

The current octal permissions test is very slow.

When patch ("checkpatch: add checks for constant non-octal permissions")
was added, processing time approximately tripled.

Regain almost all of the performance by not looping through all the
possible functions unless the line contains one of the functions.

Signed-off-by: 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