]> git.karo-electronics.de Git - karo-tx-linux.git/commit
checkpatch: correctly track the end of preprocessor commands in context
authorAndy Whitcroft <apw@canonical.com>
Thu, 8 Dec 2011 04:42:21 +0000 (15:42 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 9 Dec 2011 04:52:43 +0000 (15:52 +1100)
commite46bccbe2df3089d2b0c8042e9f2cc4c2d036a37
tree55b1d62633d610e8d77c5029aceed1239f387eeb
parent1cb71e7302a60890c7ae3ef9c2bc3e726d9c530c
checkpatch: correctly track the end of preprocessor commands in context

When looking for a statement we currently run on through preprocessor
commands.  This means that a header file with just definitions is parsed
over and over again combining all of the lines from the current line to
the end of file leading to severe performance issues.

Fix up context accumulation to track preprocessor commands and stop when
reaching the end of them.  At the same time vastly simplify the #define
handling.

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