summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-06-10 16:43:53 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-10 16:43:53 -0700
commitf5278565be81c9dccc10dc83d99f690f572b4fa7 (patch)
tree679d324d68a5c4ce62d7cdb246db3b316cad8154 /scripts
parente64f638483a21105c7ce330d543fa1f1c35b5bc7 (diff)
parent5ec45a192fe6e287f0fc06d5ca4f3bd446d94803 (diff)
downloadlinux-f5278565be81c9dccc10dc83d99f690f572b4fa7.tar.bz2
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton: "The gcc-4.4.4 workaround has actually been merged into a KVM tree by Paolo but it is stuck in linux-next and mainline needs it" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: arch/x86/kvm/mmu.c: work around gcc-4.4.4 bug sched, numa: do not hint for NUMA balancing on VM_MIXEDMAP mappings zsmalloc: fix a null pointer dereference in destroy_handle_cache() mm: memcontrol: fix false-positive VM_BUG_ON() on -rt checkpatch: fix "GLOBAL_INITIALISERS" test zram: clear disk io accounting when reset zram device memcg: do not call reclaim if !__GFP_WAIT mm/memory_hotplug.c: set zone->wait_table to null after freeing it
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 89b1df4e72ab..c5ec977b9c37 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3169,12 +3169,12 @@ sub process {
}
# check for global initialisers.
- if ($line =~ /^\+(\s*$Type\s*$Ident\s*(?:\s+$Modifier))*\s*=\s*(0|NULL|false)\s*;/) {
+ if ($line =~ /^\+$Type\s*$Ident(?:\s+$Modifier)*\s*=\s*(?:0|NULL|false)\s*;/) {
if (ERROR("GLOBAL_INITIALISERS",
"do not initialise globals to 0 or NULL\n" .
$herecurr) &&
$fix) {
- $fixed[$fixlinenr] =~ s/($Type\s*$Ident\s*(?:\s+$Modifier))*\s*=\s*(0|NULL|false)\s*;/$1;/;
+ $fixed[$fixlinenr] =~ s/(^.$Type\s*$Ident(?:\s+$Modifier)*)\s*=\s*(0|NULL|false)\s*;/$1;/;
}
}
# check for static initialisers.