qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] virtio-input: add parenthesis to const_le32
Date: Mon, 11 Apr 2016 10:14:23 -0600	[thread overview]
Message-ID: <570BCD5F.3020304@redhat.com> (raw)
In-Reply-To: <1460387988-30034-1-git-send-email-kraxel@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 778 bytes --]

On 04/11/2016 09:19 AM, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  include/hw/virtio/virtio-input.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

An explanation would have been helpful.

>  #if defined(HOST_WORDS_BIGENDIAN)
>  # define const_le32(_x)                          \
> -    (((_x & 0x000000ffU) << 24) |                \

The problem you are fixing is that _x needs parenthesis.

> +    ((((_x) & 0x000000ffU) << 24) |              \

and you indeed added it, but I had to hunt because there was no
explanation in the commit message.

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

      reply	other threads:[~2016-04-11 16:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-11 15:19 [Qemu-devel] [PATCH] virtio-input: add parenthesis to const_le32 Gerd Hoffmann
2016-04-11 16:14 ` Eric Blake [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=570BCD5F.3020304@redhat.com \
    --to=eblake@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=mst@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).