From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDs5E-0001Oq-5e for qemu-devel@nongnu.org; Wed, 21 Jan 2015 05:00:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YDs5D-0003TM-Ay for qemu-devel@nongnu.org; Wed, 21 Jan 2015 05:00:20 -0500 Message-ID: <54BF78A7.90205@redhat.com> Date: Wed, 21 Jan 2015 11:00:07 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1421771028-5251-1-git-send-email-pbonzini@redhat.com> <54BF7249.8060002@msgid.tls.msk.ru> In-Reply-To: <54BF7249.8060002@msgid.tls.msk.ru> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-stable] [PATCH] sb16: fix interrupt acknowledgement List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev , qemu-devel@nongnu.org Cc: j_bair@bellsouth.net, Gerd Hoffmann , qemu-stable@nongnu.org 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