mirror of https://github.com/thesofproject/sof.git
scripts: checkpatch: don't complain about int_t uint_t types
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
parent
4a40468b6c
commit
f32a390432
|
@ -5657,25 +5657,6 @@ sub process {
|
|||
"Using weak declarations can have unintended link defects\n" . $herecurr);
|
||||
}
|
||||
|
||||
# check for c99 types like uint8_t used outside of uapi/ and tools/
|
||||
if ($realfile !~ m@\binclude/uapi/@ &&
|
||||
$realfile !~ m@\btools/@ &&
|
||||
$line =~ /\b($Declare)\s*$Ident\s*[=;,\[]/) {
|
||||
my $type = $1;
|
||||
if ($type =~ /\b($typeC99Typedefs)\b/) {
|
||||
$type = $1;
|
||||
my $kernel_type = 'u';
|
||||
$kernel_type = 's' if ($type =~ /^_*[si]/);
|
||||
$type =~ /(\d+)/;
|
||||
$kernel_type .= $1;
|
||||
if (CHK("PREFER_KERNEL_TYPES",
|
||||
"Prefer kernel type '$kernel_type' over '$type'\n" . $herecurr) &&
|
||||
$fix) {
|
||||
$fixed[$fixlinenr] =~ s/\b$type\b/$kernel_type/;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# check for cast of C90 native int or longer types constants
|
||||
if ($line =~ /(\(\s*$C90_int_types\s*\)\s*)($Constant)\b/) {
|
||||
my $cast = $1;
|
||||
|
|
Loading…
Reference in New Issue