diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d1fe665..4e17347 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2863,9 +2863,14 @@ # warn about #if 0 if ($line =~ /^.\s*\#\s*if\s+0\b/) { - CHK("REDUNDANT_CODE", - "if this code is redundant consider removing it\n" . - $herecurr); + WARN("IF_0", + "Consider removing the code enclosed by this #if 0 and its #endif\n" . $herecurr); + } + +# warn about #if 1 + if ($line =~ /^.\s*\#\s*if\s+1\b/) { + WARN("IF_1", + "Consider removing the #if 1 and its #endif\n" . $herecurr); } # check for needless kfree() checks