Re: [Qemu-devel] [PATCH v3 for-2.2 0/8] don't use Yoda conditions

2014-08-06 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Wed, Aug 06, 2014 at 08:05:46AM +0200, Markus Armbruster wrote: >> "Gonglei (Arei)" writes: >> >> > Hi, >> > >> >> > >> >> > $WHATEVER: don't use 'Yoda conditions' >> >> > >> >> > 'Yoda conditions' are not part of idiomatic QEMU coding >> >> > style, so rewrite

Re: [Qemu-devel] [PATCH v3 for-2.2 0/8] don't use Yoda conditions

2014-08-06 Thread Michael S. Tsirkin
On Tue, Aug 05, 2014 at 07:53:51PM -0600, Eric Blake wrote: > On 08/05/2014 08:02 AM, Michael S. Tsirkin wrote: > > On Fri, Aug 01, 2014 at 03:46:08PM +0800, arei.gong...@huawei.com wrote: > >> From: Gonglei > >> > >> $WHATEVER: don't use 'Yoda conditions' > >> > >> 'Yoda conditions' are not part

Re: [Qemu-devel] [PATCH v3 for-2.2 0/8] don't use Yoda conditions

2014-08-05 Thread Michael S. Tsirkin
On Wed, Aug 06, 2014 at 08:05:46AM +0200, Markus Armbruster wrote: > "Gonglei (Arei)" writes: > > > Hi, > > > >> > > >> > $WHATEVER: don't use 'Yoda conditions' > >> > > >> > 'Yoda conditions' are not part of idiomatic QEMU coding > >> > style, so rewrite them in the more usual order. > >> > >>

Re: [Qemu-devel] [PATCH v3 for-2.2 0/8] don't use Yoda conditions

2014-08-05 Thread Markus Armbruster
"Gonglei (Arei)" writes: > Hi, > >> > >> > $WHATEVER: don't use 'Yoda conditions' >> > >> > 'Yoda conditions' are not part of idiomatic QEMU coding >> > style, so rewrite them in the more usual order. >> >> >> OK but why stop at these files? How about this >> instead? >> > I just search c file

Re: [Qemu-devel] [PATCH v3 for-2.2 0/8] don't use Yoda conditions

2014-08-05 Thread Eric Blake
On 08/05/2014 08:02 AM, Michael S. Tsirkin wrote: > On Fri, Aug 01, 2014 at 03:46:08PM +0800, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> $WHATEVER: don't use 'Yoda conditions' >> >> 'Yoda conditions' are not part of idiomatic QEMU coding >> style, so rewrite them in the more usual order

Re: [Qemu-devel] [PATCH v3 for-2.2 0/8] don't use Yoda conditions

2014-08-05 Thread Gonglei (Arei)
Hi, > > > > $WHATEVER: don't use 'Yoda conditions' > > > > 'Yoda conditions' are not part of idiomatic QEMU coding > > style, so rewrite them in the more usual order. > > > OK but why stop at these files? How about this > instead? > I just search c files by using key words like "NULL ==" etc.

Re: [Qemu-devel] [PATCH v3 for-2.2 0/8] don't use Yoda conditions

2014-08-05 Thread Michael S. Tsirkin
On Fri, Aug 01, 2014 at 03:46:08PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > $WHATEVER: don't use 'Yoda conditions' > > 'Yoda conditions' are not part of idiomatic QEMU coding > style, so rewrite them in the more usual order. OK but why stop at these files? How about this inste

[Qemu-devel] [PATCH v3 for-2.2 0/8] don't use Yoda conditions

2014-08-01 Thread arei.gonglei
From: Gonglei $WHATEVER: don't use 'Yoda conditions' 'Yoda conditions' are not part of idiomatic QEMU coding style, so rewrite them in the more usual order. v3: - rewrite CODINT_STYLE file suggested by Eric, thanks. - rename the patch serials. - imitate nearby code about using '!value' or 'v