qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] checkpatch.pl false positive
Date: Fri, 12 Sep 2014 11:36:52 +0100	[thread overview]
Message-ID: <CAFEAcA8Cw_onC1rnixtWEZAZt+zwitgLqqHqs9v40jkFr2vF4Q@mail.gmail.com> (raw)
In-Reply-To: <1410518112.30411.7.camel@nilsson.home.kraxel.org>

On 12 September 2014 11:35, Gerd Hoffmann <kraxel@redhat.com> 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

      reply	other threads:[~2014-09-12 10:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12 10:35 [Qemu-devel] checkpatch.pl false positive Gerd Hoffmann
2014-09-12 10:36 ` Peter Maydell [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=CAFEAcA8Cw_onC1rnixtWEZAZt+zwitgLqqHqs9v40jkFr2vF4Q@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=kraxel@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).