]> 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>
Fri, 16 Dec 2011 04:50:16 +0000 (15:50 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Dec 2011 06:01:22 +0000 (17:01 +1100)
commit037ab402240df5181702580daa998b6b883cbe1d
treeca3745123ae8515183419b1fa29b8f8ae0a77865
parent041d0235d828af4e8ee2bccf6e7d8aeba4df45c0
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