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 <[email protected]> > Suggested-by: Eric Blake <[email protected]> > Suggested-by: Thomas Huth <[email protected]> > Signed-off-by: Su Hang <[email protected]> > --- > 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
signature.asc
Description: PGP signature
