checkpatch: macro complexity checks are meaningless in linker scripts
authorAndy Whitcroft <apw@shadowen.org>
Thu, 24 Jul 2008 04:29:07 +0000 (21:29 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 17:47:26 +0000 (10:47 -0700)
Exclude vmlinux.lds.h from the macro complexity checks.  They will never
apply sanely here.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl

index 53ec3946670d66d889eb8c840dd2aa188c5412a0..775f2b146aa11a7326c431ea2fd6d6bcb8250ca2 100755 (executable)
@@ -1860,7 +1860,8 @@ sub process {
 # multi-statement macros should be enclosed in a do while loop, grab the
 # first statement and ensure its the whole macro if its not enclosed
 # in a known good container
-               if ($line =~ /^.\s*\#\s*define\s*$Ident(\()?/) {
+               if ($realfile !~ m@/vmlinux.lds.h$@ &&
+                   $line =~ /^.\s*\#\s*define\s*$Ident(\()?/) {
                        my $ln = $linenr;
                        my $cnt = $realcnt;
                        my ($off, $dstat, $dcond, $rest);