public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] checkpatch: don't check c99 types like uint8_t under tools
@ 2016-11-16  8:52 Tomas Winkler
  2016-11-16 14:34 ` Joe Perches
  0 siblings, 1 reply; 2+ messages in thread
From: Tomas Winkler @ 2016-11-16  8:52 UTC (permalink / raw)
  To: Andy Whitcroft, Joe Perches; +Cc: linux-kernel, Tomas Winkler

Tools contains user space code so uintX_t types are just fine.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
 scripts/checkpatch.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a8368d1c4348..42c3221be6eb 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -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/) {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] checkpatch: don't check c99 types like uint8_t under tools
  2016-11-16  8:52 [PATCH] checkpatch: don't check c99 types like uint8_t under tools Tomas Winkler
@ 2016-11-16 14:34 ` Joe Perches
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2016-11-16 14:34 UTC (permalink / raw)
  To: Tomas Winkler, Andy Whitcroft, Andrew Morton; +Cc: linux-kernel

On Wed, 2016-11-16 at 10:52 +0200, Tomas Winkler wrote:
> Tools contains user space code so uintX_t types are just fine.
> 
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
> ---
>  scripts/checkpatch.pl | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index a8368d1c4348..42c3221be6eb 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -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 <joe@perches.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-16 14:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-16  8:52 [PATCH] checkpatch: don't check c99 types like uint8_t under tools Tomas Winkler
2016-11-16 14:34 ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox