diff --git a/[refs] b/[refs] index 79643d56e4d1..10d995f5733a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4a273195a551a27a9a3ebed072c8df16c853da7f +refs/heads/master: 66c80b6077256898df948ac6acf547b47ddb1fcf diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 4bad5700670a..40b0627aeb5e 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -3265,6 +3265,12 @@ sub process { "sizeof(& should be avoided\n" . $herecurr); } +# check for sizeof without parenthesis + if ($line =~ /\bsizeof\s+((?:\*\s*|)$Lval|$Type(?:\s+$Lval|))/) { + WARN("SIZEOF_PARENTHESIS", + "sizeof $1 should be sizeof($1)\n" . $herecurr); + } + # check for line continuations in quoted strings with odd counts of " if ($rawline =~ /\\$/ && $rawline =~ tr/"/"/ % 2) { WARN("LINE_CONTINUATIONS",