diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 92e888ed939f98..e740b09176c59b 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -5016,7 +5016,7 @@ sub process { # A colon needs no spaces before when it is # terminating a case value or a label. } elsif ($opv eq ':C' || $opv eq ':L') { - if ($ctx =~ /Wx./) { + if ($ctx =~ /Wx./ and $realfile !~ m@.*\.lds\.h$@) { if (ERROR("SPACING", "space prohibited before that '$op' $at\n" . $hereptr)) { $good = rtrim($fix_elements[$n]) . trim($fix_elements[$n + 1]);