aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Eloff <kagen101@gmail.com>2010-08-09 20:21:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-09 23:45:09 -0400
commit5150bda43c58cdce7eb851c3fe2ca913524459a0 (patch)
treeec0a7222c7cb97bdf25823ec9d64d6e17b649fc8
parent5f7ddae6104d85e27c0fbcb508cfe8286a01a5e1 (diff)
checkpatch: change externals to globals
Make error message say 'ERROR: do not initialise globals to 0 or NULL' rather than 'ERROR: do not initialise externals to 0 or NULL'. Makes more sense in the context since there is an extern keyword in C and that is a global declaration within the scope of the current file. Signed-off-by: Joe Eloff <kagen101@gmail.com> Cc: Andy Whitcroft <apw@shadowen.org> Cc: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rwxr-xr-xscripts/checkpatch.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d7a44fd3b224..25d716cc44dc 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1791,9 +1791,9 @@ sub process {
1791 WARN("EXPORT_SYMBOL(foo); should immediately follow its function/variable\n" . $herecurr); 1791 WARN("EXPORT_SYMBOL(foo); should immediately follow its function/variable\n" . $herecurr);
1792 } 1792 }
1793 1793
1794# check for external initialisers. 1794# check for global initialisers.
1795 if ($line =~ /^.$Type\s*$Ident\s*(?:\s+$Modifier)*\s*=\s*(0|NULL|false)\s*;/) { 1795 if ($line =~ /^.$Type\s*$Ident\s*(?:\s+$Modifier)*\s*=\s*(0|NULL|false)\s*;/) {
1796 ERROR("do not initialise externals to 0 or NULL\n" . 1796 ERROR("do not initialise globals to 0 or NULL\n" .
1797 $herecurr); 1797 $herecurr);
1798 } 1798 }
1799# check for static initialisers. 1799# check for static initialisers.