From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51714) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSOEB-0006jU-OF for qemu-devel@nongnu.org; Fri, 12 Sep 2014 06:37:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSOE6-0007ce-3l for qemu-devel@nongnu.org; Fri, 12 Sep 2014 06:37:19 -0400 Received: from mail-la0-f45.google.com ([209.85.215.45]:42695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSOE5-0007cK-Tg for qemu-devel@nongnu.org; Fri, 12 Sep 2014 06:37:14 -0400 Received: by mail-la0-f45.google.com with SMTP id b17so661309lan.18 for ; Fri, 12 Sep 2014 03:37:12 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1410518112.30411.7.camel@nilsson.home.kraxel.org> References: <1410518112.30411.7.camel@nilsson.home.kraxel.org> From: Peter Maydell Date: Fri, 12 Sep 2014 11:36:52 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] checkpatch.pl false positive List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel On 12 September 2014 11:35, Gerd Hoffmann wrote: > Hi, > > Hooked up checkpatch to my testbuild-patch-series script. > Catched some issues, now trapped into what I think is a false positive: > > ERROR: Macros with complex values should be enclosed in parenthesis > #995: FILE: include/hw/virtio/virtio-gpu.h:99: > +#define DEFINE_VIRTIO_GPU_PCI_PROPERTIES(_state) \ > + DEFINE_PROP_BIT("ioeventfd", _state, flags, \ > + VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, false), \ > + DEFINE_PROP_UINT32("vectors", _state, nvectors, 4) > > enclosing into parenthesis just isn't going to fly here as this is an > array snipped, not some piece of code we could wrap into the usual > "{ $code } while (0)". Yes, I think we should just expect that checkpatch is sometimes going to get confused by complex macros. It's never going to be 100% accurate. -- PMM