Re: [Qemu-devel] [PATCH 4/3] checkpatch: Enforce proper do/while (0) style

2017-12-01 Thread Markus Armbruster
Eric Blake writes: > On 11/30/2017 08:01 AM, Eric Blake wrote: >> while (0) is only idiomatic in a macro definition, where the caller >> will be supplying the trailing ';'. Warn if the macro has a duplicate. >> >> Signed-off-by: Eric Blake >> --- >> scripts/checkpatch.pl | 5 + >> 1 file

Re: [Qemu-devel] [PATCH 4/3] checkpatch: Enforce proper do/while (0) style

2017-12-01 Thread Eric Blake
On 12/01/2017 01:31 AM, Markus Armbruster wrote: Eric Blake writes: On 11/30/2017 08:01 AM, Eric Blake wrote: while (0) is only idiomatic in a macro definition, where the caller will be supplying the trailing ';'. Warn if the macro has a duplicate. +# 'while (0);' is odd; only macros sh

Re: [Qemu-devel] [PATCH 4/3] checkpatch: Enforce proper do/while (0) style

2017-11-30 Thread Eric Blake
On 11/30/2017 08:01 AM, Eric Blake wrote: while (0) is only idiomatic in a macro definition, where the caller will be supplying the trailing ';'. Warn if the macro has a duplicate. Signed-off-by: Eric Blake --- scripts/checkpatch.pl | 5 + 1 file changed, 5 insertions(+) diff --git a/s

[Qemu-devel] [PATCH 4/3] checkpatch: Enforce proper do/while (0) style

2017-11-30 Thread Eric Blake
while (0) is only idiomatic in a macro definition, where the caller will be supplying the trailing ';'. Warn if the macro has a duplicate. Signed-off-by: Eric Blake --- scripts/checkpatch.pl | 5 + 1 file changed, 5 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl i