]> 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>
Tue, 13 Dec 2011 06:43:19 +0000 (17:43 +1100)
commit5b38db54e2e20f3ba1bdb4fce31b649b7686b816
treedb574012e47fb252e3ba16972e4aedb99ce84da4
parentdb96e7ff5da61fcb462380af0196f62452e15a2b
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