qemu-trivial
[Top][All Lists]
Advanced

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

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


From: Peter Maydell
Subject: Re: [Qemu-trivial] [PATCH 6/6] Add comma after DEFINE_PROP_END_OF_LIST()
Date: Tue, 12 May 2015 07:59:21 +0100

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.

-- PMM



reply via email to

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