From: Andy Whitcroft Date: Tue, 6 Jan 2009 22:41:28 +0000 (-0800) Subject: checkpatch: do not report nr_static as a static declaration X-Git-Tag: v2.6.29-rc1~338 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2d1bafd799ee0442979e6ce4145d58b69d3cade2;p=linux-2.6-omap-h63xx.git checkpatch: do not report nr_static as a static declaration Ensure we do not report identifiers containing the word static as static declarations. For example this should not be reported as an unecessary assignement of 0: long nr_static = 0; 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 906624c0e9e..a521d493b0c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1632,7 +1632,7 @@ sub process { $herecurr); } # check for static initialisers. - if ($line =~ /\s*static\s.*=\s*(0|NULL|false)\s*;/) { + if ($line =~ /\bstatic\s.*=\s*(0|NULL|false)\s*;/) { ERROR("do not initialise statics to 0 or NULL\n" . $herecurr); }