All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shannon Zhao <zhaoshenglong@huawei.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	Shannon Zhao <shannon.zhao@linaro.org>
Cc: hangaohuai@huawei.com, QEMU Trivial <qemu-trivial@nongnu.org>,
	Michael Tokarev <mjt@tls.msk.ru>,
	QEMU Developers <qemu-devel@nongnu.org>,
	"Huangpeng \(Peter\)" <peter.huangpeng@huawei.com>,
	Christoffer Dall <christoffer.dall@linaro.org>
Subject: Re: [Qemu-trivial] [PATCH 6/6] Add comma after DEFINE_PROP_END_OF_LIST()
Date: Tue, 12 May 2015 15:11:03 +0800	[thread overview]
Message-ID: <5551A787.3050404@huawei.com> (raw)
In-Reply-To: <CAFEAcA9+Gd+-WOHJjMrA7f7pcW7usccRSuL2i8E3Uc=tp1Eifw@mail.gmail.com>

On 2015/5/12 14:59, Peter Maydell wrote:
> On 12 May 2015 at 03:25,  <shannon.zhao@linaro.org> wrote:
>> From: Shannon Zhao <shannon.zhao@linaro.org>
>>
>> Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
>> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
>> ---
>> diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
>> index 433463e..d2b3f37 100644
>> --- a/hw/audio/intel-hda.c
>> +++ b/hw/audio/intel-hda.c
>> @@ -31,7 +31,7 @@
>>
>>  static Property hda_props[] = {
>>      DEFINE_PROP_UINT32("cad", HDACodecDevice, cad, -1),
>> -    DEFINE_PROP_END_OF_LIST()
>> +    DEFINE_PROP_END_OF_LIST(),
>>  };
> 
> Why do we need to do this? The usual reason for having a comma
> after the last item in an array is so that if we add another
> item after it later we don't have to edit the line that used to
> be last. But with these lists the DEFINE_PROP_END_OF_LIST()
> line remains last by definition -- new entries will always go
> above it, and anything below it would be a bug. So there's no
> point in having a comma after it.
> 

Here I just want to make the code style consistent. If this is not
necessary, we can drop this one.

-- 
Shannon



WARNING: multiple messages have this Message-ID (diff)
From: Shannon Zhao <zhaoshenglong@huawei.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	Shannon Zhao <shannon.zhao@linaro.org>
Cc: hangaohuai@huawei.com, QEMU Trivial <qemu-trivial@nongnu.org>,
	Michael Tokarev <mjt@tls.msk.ru>,
	QEMU Developers <qemu-devel@nongnu.org>,
	"Huangpeng (Peter)" <peter.huangpeng@huawei.com>,
	Christoffer Dall <christoffer.dall@linaro.org>
Subject: Re: [Qemu-devel] [PATCH 6/6] Add comma after DEFINE_PROP_END_OF_LIST()
Date: Tue, 12 May 2015 15:11:03 +0800	[thread overview]
Message-ID: <5551A787.3050404@huawei.com> (raw)
In-Reply-To: <CAFEAcA9+Gd+-WOHJjMrA7f7pcW7usccRSuL2i8E3Uc=tp1Eifw@mail.gmail.com>

On 2015/5/12 14:59, Peter Maydell wrote:
> On 12 May 2015 at 03:25,  <shannon.zhao@linaro.org> wrote:
>> From: Shannon Zhao <shannon.zhao@linaro.org>
>>
>> Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
>> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
>> ---
>> diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
>> index 433463e..d2b3f37 100644
>> --- a/hw/audio/intel-hda.c
>> +++ b/hw/audio/intel-hda.c
>> @@ -31,7 +31,7 @@
>>
>>  static Property hda_props[] = {
>>      DEFINE_PROP_UINT32("cad", HDACodecDevice, cad, -1),
>> -    DEFINE_PROP_END_OF_LIST()
>> +    DEFINE_PROP_END_OF_LIST(),
>>  };
> 
> Why do we need to do this? The usual reason for having a comma
> after the last item in an array is so that if we add another
> item after it later we don't have to edit the line that used to
> be last. But with these lists the DEFINE_PROP_END_OF_LIST()
> line remains last by definition -- new entries will always go
> above it, and anything below it would be a bug. So there's no
> point in having a comma after it.
> 

Here I just want to make the code style consistent. If this is not
necessary, we can drop this one.

-- 
Shannon

  reply	other threads:[~2015-05-12  7:11 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12  2:25 [Qemu-trivial] [PATCH 0/6] Blank property cleanup shannon.zhao
2015-05-12  2:25 ` [Qemu-devel] " shannon.zhao
2015-05-12  2:25 ` [Qemu-trivial] [PATCH 1/6] hw/s390x/s390-virtio-bus: Remove meaningless blank Property shannon.zhao
2015-05-12  2:25   ` [Qemu-devel] " shannon.zhao
2015-05-12  7:35   ` [Qemu-trivial] " Cornelia Huck
2015-05-12  7:35     ` Cornelia Huck
2015-05-12  7:52   ` [Qemu-trivial] " Peter Maydell
2015-05-12  7:52     ` [Qemu-devel] " Peter Maydell
2015-05-12  7:55     ` [Qemu-trivial] " Shannon Zhao
2015-05-12  7:55       ` [Qemu-devel] " Shannon Zhao
2015-09-11  8:00   ` [Qemu-trivial] " Michael Tokarev
2015-09-11  8:00     ` [Qemu-devel] " Michael Tokarev
2015-09-11 13:41     ` [Qemu-trivial] " Andreas Färber
2015-09-11 13:41       ` Andreas Färber
2015-05-12  2:25 ` [Qemu-trivial] [PATCH 2/6] hw/virtio/virtio-balloon: " shannon.zhao
2015-05-12  2:25   ` [Qemu-devel] " shannon.zhao
2015-09-11  8:01   ` [Qemu-trivial] " Michael Tokarev
2015-09-11  8:01     ` [Qemu-devel] " Michael Tokarev
2015-05-12  2:25 ` [Qemu-trivial] [PATCH 3/6] hw/virtio/virtio-pci: " shannon.zhao
2015-05-12  2:25   ` [Qemu-devel] " shannon.zhao
2015-09-11  8:02   ` [Qemu-trivial] " Michael Tokarev
2015-09-11  8:02     ` [Qemu-devel] " Michael Tokarev
2015-05-12  2:25 ` [Qemu-trivial] [PATCH 4/6] hw/gpio/zaurus: " shannon.zhao
2015-05-12  2:25   ` [Qemu-devel] " shannon.zhao
2015-09-11  8:04   ` [Qemu-trivial] " Michael Tokarev
2015-09-11  8:04     ` [Qemu-devel] " Michael Tokarev
2015-05-12  2:25 ` [Qemu-trivial] [PATCH 5/6] hw/arm/spitz: " shannon.zhao
2015-05-12  2:25   ` [Qemu-devel] " shannon.zhao
2015-09-11  8:04   ` [Qemu-trivial] " Michael Tokarev
2015-09-11  8:04     ` [Qemu-devel] " Michael Tokarev
2015-05-12  2:25 ` [Qemu-trivial] [PATCH 6/6] Add comma after DEFINE_PROP_END_OF_LIST() shannon.zhao
2015-05-12  2:25   ` [Qemu-devel] " shannon.zhao
2015-05-12  6:59   ` [Qemu-trivial] " Peter Maydell
2015-05-12  6:59     ` [Qemu-devel] " Peter Maydell
2015-05-12  7:11     ` Shannon Zhao [this message]
2015-05-12  7:11       ` Shannon Zhao
2015-09-11  8:21   ` [Qemu-trivial] " Michael Tokarev
2015-09-11  8:21     ` [Qemu-devel] " Michael Tokarev
2015-09-11 13:39     ` [Qemu-trivial] " Andreas Färber
2015-09-11 13:39       ` Andreas Färber
2015-05-20  1:06 ` [Qemu-trivial] [PATCH 0/6] Blank property cleanup Shannon Zhao
2015-05-20  1:06   ` [Qemu-devel] " Shannon Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5551A787.3050404@huawei.com \
    --to=zhaoshenglong@huawei.com \
    --cc=christoffer.dall@linaro.org \
    --cc=hangaohuai@huawei.com \
    --cc=mjt@tls.msk.ru \
    --cc=peter.huangpeng@huawei.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=shannon.zhao@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.