qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] checkpatch: add hwaddr to @typeList


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] checkpatch: add hwaddr to @typeList
Date: Thu, 14 Sep 2017 15:16:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 14/09/2017 11:12, Greg Kurz wrote:
> The script doesn't know about all possible types and learn them as
> it parses the code. If it reaches a line with a type cast but the
> type isn't known yet, it is misinterpreted as an identifier.
> 
> For example the following line:
> 
>     foo = (hwaddr) -1;
> 
> results in the following false-positive to be reported:
> 
> ERROR: spaces required around that '-' (ctx:VxV)
> 
> Let's add this standard QEMU type to the list of pre-known types.
> 
> Signed-off-by: Greg Kurz <address@hidden>
> ---
> 
> checkpatch doesn't have an official maintainer, Cc'ing David in case he
> agrees to carry this patch through his ppc tree, along with:
> 
> https://lists.nongnu.org/archive/html/qemu-devel/2017-09/msg03686.html
> 
>  scripts/checkpatch.pl |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index fa478074b88d..def5bc1cc0e1 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -213,6 +213,7 @@ our @typeList = (
>       qr{${Ident}_handler},
>       qr{${Ident}_handler_fn},
>       qr{target_(?:u)?long},
> +     qr{hwaddr},
>  );
>  
>  # This can be modified by sub possible.  Since it can be empty, be careful
> 

Queued, thanks.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]