Re: [Qemu-devel] [PATCH v4] scripts/checkpatch.pl: add check for `while` and `for`

2018-03-06 Thread Stefan Hajnoczi
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: > ''' >

Re: [Qemu-devel] [PATCH v4] scripts/checkpatch.pl: add check for `while` and `for`

2018-03-06 Thread Paolo Bonzini
On 06/03/2018 08:04, 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 || > co

[Qemu-devel] [PATCH v4] scripts/checkpatch.pl: add check for `while` and `for`

2018-03-05 Thread Su Hang
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 c