checkpatch: add check for `while` and `for`
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]>
Message-Id: <
1520319890[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>