On Tue, Mar 06, 2018 at 03:04:50PM +0800, Su Hang wrote:
> Adding check for `while` and `for` statements, which condition has more than
> one line.
> 
> The former checkpatch.pl can check `if` statement, which condition has more
> than one line, whether block misses brace round, like this:
> '''
> if (cond1 ||
>     cond2)
>     statement;
> '''
> But it doesn't do the same check for `for` and `while` statements.
> 
> Using `(?:...)` instead of `(...)` in regex pattern catch.
> Because `(?:...)` is faster and avoids unwanted side-effect.
> 
> Suggested-by: Stefan Hajnoczi <stefa...@redhat.com>
> Suggested-by: Eric Blake <ebl...@redhat.com>
> Suggested-by: Thomas Huth <th...@redhat.com>
> Signed-off-by: Su Hang <suhan...@mails.ucas.ac.cn>
> ---
>  scripts/checkpatch.pl | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Thanks, applied to my block-next tree:
https://github.com/stefanha/qemu/commits/block-next

Stefan

Attachment: signature.asc
Description: PGP signature

Reply via email to