qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] checkpatch: don't error out on },{ lines


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] checkpatch: don't error out on },{ lines
Date: Thu, 30 Jun 2011 14:08:03 +0100

On Wed, Jun 29, 2011 at 7:09 AM, Alexander Graf <address@hidden> wrote:
> When having code like this:
>
>    static PCIDeviceInfo piix_ide_info[] = {
>        {
>            .qdev.name    = "piix3-ide",
>            .qdev.size    = sizeof(PCIIDEState),
>            .qdev.no_user = 1,
>            .no_hotplug   = 1,
>            .init         = pci_piix_ide_initfn,
>            .vendor_id    = PCI_VENDOR_ID_INTEL,
>            .device_id    = PCI_DEVICE_ID_INTEL_82371SB_1,
>            .class_id     = PCI_CLASS_STORAGE_IDE,
>        },{
>            .qdev.name    = "piix4-ide",
>            .qdev.size    = sizeof(PCIIDEState),
>            .qdev.no_user = 1,
>            .no_hotplug   = 1,
>            .init         = pci_piix_ide_initfn,
>            .vendor_id    = PCI_VENDOR_ID_INTEL,
>            .device_id    = PCI_DEVICE_ID_INTEL_82371AB,
>            .class_id     = PCI_CLASS_STORAGE_IDE,
>        },{
>            /* end of list */
>        }
>    };
>
> checkpatch currently errors out, claiming that spaces need to follow
> commas. However, this particular style of defining structs is pretty
> common in qemu code and very readable. So let's declare it as supported
> for the above case.
>
> Reported-by: Kevin Wolf <address@hidden>
> Signed-off-by: Alexander Graf <address@hidden>
> ---
>  scripts/checkpatch.pl |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)

Good idea.  I was going to go and change qemu-config.c but updating
checkpatch.pl probably makes more sense.

Stefan



reply via email to

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