qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Alexander Graf <agraf@suse.de>
Cc: Kevin Wolf <kwolf@redhat.com>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] checkpatch: don't error out on },{ lines
Date: Thu, 30 Jun 2011 14:08:03 +0100	[thread overview]
Message-ID: <BANLkTinKS=NMws_M3yZkjuhN0u47o3m_gQ@mail.gmail.com> (raw)
In-Reply-To: <1309327773-18966-1-git-send-email-agraf@suse.de>

On Wed, Jun 29, 2011 at 7:09 AM, Alexander Graf <agraf@suse.de> 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 <kwolf@redhat.com>
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
>  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	other threads:[~2011-06-30 13:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-29  6:09 [Qemu-devel] [PATCH] checkpatch: don't error out on },{ lines Alexander Graf
2011-06-30 13:08 ` Stefan Hajnoczi [this message]

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='BANLkTinKS=NMws_M3yZkjuhN0u47o3m_gQ@mail.gmail.com' \
    --to=stefanha@gmail.com \
    --cc=agraf@suse.de \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).