Re: [Qemu-devel] [PATCH v3 1/8] CODING_STYLE: Section about conditional statement

2014-08-05 Thread Gonglei (Arei)
Hi, > > > > > >> > Yoda conditions lack readability, and QEMU has a > > >> > strict compiler configuration for checking a common > > >> > mistake like "if (dev = NULL)". Make it a written rule. > > > > >> > > >> I know this is my suggested text, but now that I'm re-reading it, I'd > > >> recommen

Re: [Qemu-devel] [PATCH v3 1/8] CODING_STYLE: Section about conditional statement

2014-08-05 Thread Michael S. Tsirkin
On Tue, Aug 05, 2014 at 04:48:18PM +0100, Alex Bennée wrote: > > Gonglei (Arei) writes: > > > Hi, > > > >> > Yoda conditions lack readability, and QEMU has a > >> > strict compiler configuration for checking a common > >> > mistake like "if (dev = NULL)". Make it a written rule. > > >> > >> I k

Re: [Qemu-devel] [PATCH v3 1/8] CODING_STYLE: Section about conditional statement

2014-08-05 Thread Alex Bennée
Gonglei (Arei) writes: > Hi, > >> > Yoda conditions lack readability, and QEMU has a >> > strict compiler configuration for checking a common >> > mistake like "if (dev = NULL)". Make it a written rule. >> >> I know this is my suggested text, but now that I'm re-reading it, I'd >> recommend s/0

Re: [Qemu-devel] [PATCH v3 1/8] CODING_STYLE: Section about conditional statement

2014-08-03 Thread Gonglei (Arei)
Hi, > > Yoda conditions lack readability, and QEMU has a > > strict compiler configuration for checking a common > > mistake like "if (dev = NULL)". Make it a written rule. > > > > Signed-off-by: Gonglei > > --- > > CODING_STYLE | 14 ++ > > 1 file changed, 14 insertions(+) > > > > d

Re: [Qemu-devel] [PATCH v3 1/8] CODING_STYLE: Section about conditional statement

2014-08-01 Thread Eric Blake
On 08/01/2014 01:46 AM, arei.gong...@huawei.com wrote: > From: Gonglei > > Yoda conditions lack readability, and QEMU has a > strict compiler configuration for checking a common > mistake like "if (dev = NULL)". Make it a written rule. > > Signed-off-by: Gonglei > --- > CODING_STYLE | 14 +

[Qemu-devel] [PATCH v3 1/8] CODING_STYLE: Section about conditional statement

2014-08-01 Thread arei.gonglei
From: Gonglei Yoda conditions lack readability, and QEMU has a strict compiler configuration for checking a common mistake like "if (dev = NULL)". Make it a written rule. Signed-off-by: Gonglei --- CODING_STYLE | 14 ++ 1 file changed, 14 insertions(+) diff --git a/CODING_STYLE b/