提交 5150bda4 编写于 作者: J Joe Eloff 提交者: Linus Torvalds

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: NJoe Eloff <kagen101@gmail.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 5f7ddae6
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册