From 5150bda43c58cdce7eb851c3fe2ca913524459a0 Mon Sep 17 00:00:00 2001 From: Joe Eloff Date: Mon, 9 Aug 2010 17:21:00 -0700 Subject: 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 Cc: Andy Whitcroft Cc: Wolfram Sang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d7a44fd..25d716c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1791,9 +1791,9 @@ sub process { WARN("EXPORT_SYMBOL(foo); should immediately follow its function/variable\n" . $herecurr); } -# check for external initialisers. +# check for global initialisers. if ($line =~ /^.$Type\s*$Ident\s*(?:\s+$Modifier)*\s*=\s*(0|NULL|false)\s*;/) { - ERROR("do not initialise externals to 0 or NULL\n" . + ERROR("do not initialise globals to 0 or NULL\n" . $herecurr); } # check for static initialisers. -- cgit v1.1