qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 6/6] Add comma after DEFINE_PROP_END_OF_LIST()


From: Shannon Zhao
Subject: Re: [Qemu-devel] [PATCH 6/6] Add comma after DEFINE_PROP_END_OF_LIST()
Date: Tue, 12 May 2015 15:11:03 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

On 2015/5/12 14:59, Peter Maydell wrote:
> On 12 May 2015 at 03:25,  <address@hidden> wrote:
>> From: Shannon Zhao <address@hidden>
>>
>> Signed-off-by: Shannon Zhao <address@hidden>
>> Signed-off-by: Shannon Zhao <address@hidden>
>> ---
>> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]