summaryrefslogtreecommitdiffstats
path: root/tools/checkpatch.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/checkpatch.pl')
-rwxr-xr-xtools/checkpatch.pl13
1 files changed, 0 insertions, 13 deletions
diff --git a/tools/checkpatch.pl b/tools/checkpatch.pl
index ecae0e9..f52f1a1 100755
--- a/tools/checkpatch.pl
+++ b/tools/checkpatch.pl
@@ -4656,19 +4656,6 @@ sub process {
$herecurr);
}
-# check for sizeof(foo)/sizeof(foo[0]) that could be ARRAY_SIZE(foo)
- if ($line =~ m@\bsizeof\s*\(\s*($Lval)\s*\)@) {
- my $array = $1;
- if ($line =~ m@\b(sizeof\s*\(\s*\Q$array\E\s*\)\s*/\s*sizeof\s*\(\s*\Q$array\E\s*\[\s*0\s*\]\s*\))@) {
- my $array_div = $1;
- if (WARN("ARRAY_SIZE",
- "Prefer ARRAY_SIZE($array)\n" . $herecurr) &&
- $fix) {
- $fixed[$fixlinenr] =~ s/\Q$array_div\E/ARRAY_SIZE($array)/;
- }
- }
- }
-
# check for function declarations without arguments like "int foo()"
if ($line =~ /(\b$Type\s*$Ident)\s*\(\s*\)/) {
if (ERROR("FUNCTION_WITHOUT_ARGS",