From: Andy Whitcroft Date: Thu, 24 Jul 2008 04:29:07 +0000 (-0700) Subject: checkpatch: macro complexity checks are meaningless in linker scripts X-Git-Tag: v2.6.27-rc1~699 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=b8f96a31f38c8e9fc75f0a89c6815e7cbc402858;p=linux-2.6-omap-h63xx.git checkpatch: macro complexity checks are meaningless in linker scripts Exclude vmlinux.lds.h from the macro complexity checks. They will never apply sanely here. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 53ec3946670..775f2b146aa 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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);