diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2024-02-15 10:19:36 -0500 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2024-03-04 11:03:46 -0500 | 
| commit | 852a74807fe1af51d69fd327156084b3e5d68fe4 (patch) | |
| tree | 3ba3eb52aefeb16308bf6f9ec0574581096be56b /tools | |
| parent | c256a9a40a42d617ace08cfd7c7447e7cb705e38 (diff) | |
doc, tools: Remove ARRAY_SIZE check
checkpatch.pl wants you to use ARRAY_SIZE in a kernel
header file.  We don't have access to this kernel header
file for normal compilation.  I'm just going to remove it.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/checkpatch.pl | 13 | 
1 files changed, 0 insertions, 13 deletions
diff --git a/tools/checkpatch.pl b/tools/checkpatch.pl index ecae0e92a1..f52f1a1616 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",  | 
