]> 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>
Wed, 14 Dec 2011 05:51:56 +0000 (16:51 +1100)
commit080c2eac6f1e28c1e4bf34a32f627b7d86fbfa38
tree42f1446955a8a72ee16edc43c6955989db5145ac
parentd7bbaeb7b16016a8f224def54ee1e4b9d9a1be49
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