checkpatch: don't check c99 types like uint8_t under tools
PATCH 1/1 checkpatch: don't check c99 types like uint8_t under tools
Tools contains user space code so uintX_t types are just fine.
Signed-off-by Tomas Winkler <[email protected]>
--- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
scripts/checkpatch.pl +2 -1
@@ -5548,8 +5548,9 @@ sub process { "Using weak declarations can have unintended link defects\n" . $herecurr); } -# check for c99 types like uint8_t used outside of uapi/ +# 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/) {
Signature · 1 line
2.7.4
Quoted 12 lines · Tomas Winkler
Tools contains user space code so
uintX_ttypes are just fine.Signed-off-by Tomas Winkler <[email protected]>--- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)scripts/checkpatch.pl +0
-0
scripts/checkpatch.pl sub process { · line 5556
Quoted 10 lines
scripts/checkpatch.pl +2
-1@@ -5548,8 +5548,9 @@ sub process { "Using weak declarations can have unintended link defects\n" . $herecurr); } -# check for c99 types like uint8_t used outside of uapi/ +# 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/) {
Makes sense, thanks.
Acked-by Joe Perches <[email protected]>