checkpatch: do not report nr_static as a static declaration
Changes
1 files changed · +1 −1
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| scripts/checkpatch.pl | modified | +1 | −1 | View file |
scripts/checkpatch.pl
View filediff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 906624c..a521d49 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);
}