From: Paolo Bonzini <pbonzini@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>, qemu-devel@nongnu.org
Cc: j_bair@bellsouth.net, Gerd Hoffmann <kraxel@redhat.com>,
qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-stable] [PATCH] sb16: fix interrupt acknowledgement
Date: Wed, 21 Jan 2015 11:00:07 +0100 [thread overview]
Message-ID: <54BF78A7.90205@redhat.com> (raw)
In-Reply-To: <54BF7249.8060002@msgid.tls.msk.ru>
On 21/01/2015 10:32, Michael Tokarev wrote:
>> > --- a/hw/audio/sb16.c
>> > +++ b/hw/audio/sb16.c
>> > @@ -999,7 +999,7 @@ static IO_READ_PROTO (dsp_read)
>> > retval = (!s->out_data_len || s->highspeed) ? 0 : 0x80;
>> > if (s->mixer_regs[0x82] & 1) {
>> > ack = 1;
>> > - s->mixer_regs[0x82] &= 1;
>> > + s->mixer_regs[0x82] &= ~1;
> Shouldn't it be ~1u instead?
It's the same since mixer_regs is an array of uint8_t.
I'm not a fan of unsigned suffixes, especially after ~ where most of the
time they're wrong. For example if x is uint64_t:
x &= ~1 is right
x &= ~1ull is right
x &= ~1u also clears bits 32...64
x &= ~1ul also clears bits 32...64 on 32-bit machines
Paolo
next prev parent reply other threads:[~2015-01-21 10:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 16:23 [Qemu-devel] [PATCH] sb16: fix interrupt acknowledgement Paolo Bonzini
2015-01-21 9:32 ` [Qemu-devel] [Qemu-stable] " Michael Tokarev
2015-01-21 10:00 ` Paolo Bonzini [this message]
2015-01-22 9:56 ` [Qemu-devel] " Gerd Hoffmann
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=54BF78A7.90205@redhat.com \
--to=pbonzini@redhat.com \
--cc=j_bair@bellsouth.net \
--cc=kraxel@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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).