From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcGyU-00061d-OM for qemu-devel@nongnu.org; Thu, 30 Jun 2011 09:08:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcGyS-0003e8-Un for qemu-devel@nongnu.org; Thu, 30 Jun 2011 09:08:06 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:38988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcGyS-0003e0-K2 for qemu-devel@nongnu.org; Thu, 30 Jun 2011 09:08:04 -0400 Received: by gxk26 with SMTP id 26so999384gxk.4 for ; Thu, 30 Jun 2011 06:08:03 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1309327773-18966-1-git-send-email-agraf@suse.de> References: <1309327773-18966-1-git-send-email-agraf@suse.de> Date: Thu, 30 Jun 2011 14:08:03 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] checkpatch: don't error out on },{ lines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Kevin Wolf , "qemu-devel@nongnu.org Developers" On Wed, Jun 29, 2011 at 7:09 AM, Alexander Graf wrote: > When having code like this: > > =A0 =A0static PCIDeviceInfo piix_ide_info[] =3D { > =A0 =A0 =A0 =A0{ > =A0 =A0 =A0 =A0 =A0 =A0.qdev.name =A0 =A0=3D "piix3-ide", > =A0 =A0 =A0 =A0 =A0 =A0.qdev.size =A0 =A0=3D sizeof(PCIIDEState), > =A0 =A0 =A0 =A0 =A0 =A0.qdev.no_user =3D 1, > =A0 =A0 =A0 =A0 =A0 =A0.no_hotplug =A0 =3D 1, > =A0 =A0 =A0 =A0 =A0 =A0.init =A0 =A0 =A0 =A0 =3D pci_piix_ide_initfn, > =A0 =A0 =A0 =A0 =A0 =A0.vendor_id =A0 =A0=3D PCI_VENDOR_ID_INTEL, > =A0 =A0 =A0 =A0 =A0 =A0.device_id =A0 =A0=3D PCI_DEVICE_ID_INTEL_82371SB_= 1, > =A0 =A0 =A0 =A0 =A0 =A0.class_id =A0 =A0 =3D PCI_CLASS_STORAGE_IDE, > =A0 =A0 =A0 =A0},{ > =A0 =A0 =A0 =A0 =A0 =A0.qdev.name =A0 =A0=3D "piix4-ide", > =A0 =A0 =A0 =A0 =A0 =A0.qdev.size =A0 =A0=3D sizeof(PCIIDEState), > =A0 =A0 =A0 =A0 =A0 =A0.qdev.no_user =3D 1, > =A0 =A0 =A0 =A0 =A0 =A0.no_hotplug =A0 =3D 1, > =A0 =A0 =A0 =A0 =A0 =A0.init =A0 =A0 =A0 =A0 =3D pci_piix_ide_initfn, > =A0 =A0 =A0 =A0 =A0 =A0.vendor_id =A0 =A0=3D PCI_VENDOR_ID_INTEL, > =A0 =A0 =A0 =A0 =A0 =A0.device_id =A0 =A0=3D PCI_DEVICE_ID_INTEL_82371AB, > =A0 =A0 =A0 =A0 =A0 =A0.class_id =A0 =A0 =3D PCI_CLASS_STORAGE_IDE, > =A0 =A0 =A0 =A0},{ > =A0 =A0 =A0 =A0 =A0 =A0/* end of list */ > =A0 =A0 =A0 =A0} > =A0 =A0}; > > 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 > Signed-off-by: Alexander Graf > --- > =A0scripts/checkpatch.pl | =A0 =A04 +++- > =A01 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