]> 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>
Mon, 19 Dec 2011 07:19:39 +0000 (18:19 +1100)
commitf307a38a9bf4756ca6ec36caac514ddc49187010
tree12bab846063b91c00ce488609415233cdfcdbf5f
parent8c53fc33b8272d5838ea5b2b0407e7df6b9e8446
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