diff --git a/[refs] b/[refs] index 3cc34da31e52..c8fffadb0d33 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 849382948992cc6482c778b1e854c19368b60c05 +refs/heads/master: 8f53a9b80f011080555c498d2ca2dc6b1a77c42c diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 3257d3d96767..309050f30874 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -2572,6 +2572,11 @@ sub process { WARN("plain inline is preferred over $1\n" . $herecurr); } +# check for sizeof(&) + if ($line =~ /\bsizeof\s*\(\s*\&/) { + WARN("sizeof(& should be avoided\n" . $herecurr); + } + # check for new externs in .c files. if ($realfile =~ /\.c$/ && defined $stat && $stat =~ /^.\s*(?:extern\s+)?$Type\s+($Ident)(\s*)\(/s)