diff --git a/[refs] b/[refs] index 13606e83f360..72ad09f2b9c7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8ed22cad9ce16e3d8915ae75544a133c3050d96f +refs/heads/master: f16fa28f7b3d95e989fc64c8480e44c1bcf4bac3 diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 4680ccf7760c..c479bdefc779 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -1468,6 +1468,12 @@ sub process { while ($cond_ptr != $cond_lines) { $cond_ptr = $cond_lines; + # If we see an #else/#elif then the code + # is not linear. + if ($s =~ /^\s*\#\s*(?:else|elif)/) { + $check = 0; + } + # Ignore: # 1) blank lines, they should be at 0, # 2) preprocessor lines, and