qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 6/6] checkpatch: warn about queue/queue.h head s


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 6/6] checkpatch: warn about queue/queue.h head structs that are not typedef-ed
Date: Fri, 07 Dec 2018 10:02:28 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Let's state the rationale for requiring a typedef in the commit
message, or point to a prior commit that has it.

Paolo Bonzini <address@hidden> writes:

> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  scripts/checkpatch.pl | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index a8d6e44107..b4b3495044 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2263,6 +2263,11 @@ sub process {
>                       }
>               }
>  
> +             if ($line =~ 
> /^.\s*(Q(?:S?LIST|SIMPLEQ|TAILQ)_HEAD)\s*\(\s*[^,]/ &&
> +                 $line !~ /^.typedef/) {
> +                 ERROR("named $1 should be typedefed separately\n" . 
> $herecurr);
> +             }
> +
>  # Need a space before open parenthesis after if, while etc
>               if ($line=~/\b(if|while|for|switch)\(/) {
>                       ERROR("space required before the open parenthesis 
> '('\n" . $herecurr);



reply via email to

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