From: "Daniel P. Berrange" <berrange@redhat.com>
To: Felipe Franciosi <felipe@nutanix.com>
Cc: "Marc-André Lureau" <mlureau@redhat.com>,
"Marc-Andre Lureau" <marcandre.lureau@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] io: Fix double shift usages on QIOChannel features
Date: Wed, 28 Sep 2016 12:00:25 +0100 [thread overview]
Message-ID: <20160928110025.GL21583@redhat.com> (raw)
In-Reply-To: <DF9CD252-1508-4F54-9A47-90BCC55ACBD0@nutanix.com>
On Wed, Sep 28, 2016 at 10:55:33AM +0000, Felipe Franciosi wrote:
> Hi Marc,
>
> > On 27 Sep 2016, at 18:12, Marc-André Lureau <mlureau@redhat.com> wrote:
> >
> > Hi
> >
> > ----- Original Message -----
> >> When QIOChannels were introduced in 666a3af9, the feature bits were
> >> defined shifted. However, when using them, the code was shifting them
> >> again. The incorrect use was consistent until 74b6ce43, where
> >> QIO_CHANNEL_FEATURE_LISTEN was defined shifted but tested unshifted.
> >>
> >
> > And by luck, QIO_CHANNEL_FEATURE_LISTEN == (1 << QIO_CHANNEL_FEATURE_LISTEN), so it works :)
>
> Can you elaborate on that? Maybe I'm missing something obvious, but
> I'm confused as to how they are equivalent.
They're not equivalent QIO_CHANNEL_FEATURE_LISTEN is (1 << 2) which
evaulates to 4 and 4 != (1 << 4).
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|
next prev parent reply other threads:[~2016-09-28 11:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-27 16:49 [Qemu-devel] [PATCH] io: Fix double shift usages on QIOChannel features Felipe Franciosi
2016-09-27 16:53 ` no-reply
2016-09-27 17:12 ` Marc-André Lureau
2016-09-28 10:55 ` Felipe Franciosi
2016-09-28 10:58 ` Marc-André Lureau
2016-09-28 11:06 ` Marc-André Lureau
2016-09-28 11:00 ` Daniel P. Berrange [this message]
2016-09-27 17:23 ` Daniel P. Berrange
2016-09-27 17:57 ` Felipe Franciosi
2016-09-27 18:04 ` Daniel P. Berrange
2016-09-27 18:16 ` Felipe Franciosi
2016-09-27 18:35 ` Felipe Franciosi
2016-09-28 9:21 ` Daniel P. Berrange
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=20160928110025.GL21583@redhat.com \
--to=berrange@redhat.com \
--cc=felipe@nutanix.com \
--cc=marcandre.lureau@redhat.com \
--cc=mlureau@redhat.com \
--cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.