From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFTwP-0007RS-29 for qemu-devel@nongnu.org; Tue, 21 Jun 2016 18:14:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFTwJ-0000w4-12 for qemu-devel@nongnu.org; Tue, 21 Jun 2016 18:14:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41509) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFTwI-0000vo-Od for qemu-devel@nongnu.org; Tue, 21 Jun 2016 18:14:34 -0400 References: <1466514977-12670-1-git-send-email-pbonzini@redhat.com> From: Eric Blake Message-ID: <5769BC49.3020803@redhat.com> Date: Tue, 21 Jun 2016 16:14:33 -0600 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nbeaP2DM284HRrq2KUklNP8xVRHXXfFib" Subject: Re: [Qemu-devel] [PATCH] xlnx_dp: fix iffy xlnx_dp_aux_push_tx_fifo List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: KONRAD Frederic , Paolo Bonzini , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --nbeaP2DM284HRrq2KUklNP8xVRHXXfFib From: Eric Blake To: KONRAD Frederic , Paolo Bonzini , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org Message-ID: <5769BC49.3020803@redhat.com> Subject: Re: [Qemu-devel] [PATCH] xlnx_dp: fix iffy xlnx_dp_aux_push_tx_fifo References: <1466514977-12670-1-git-send-email-pbonzini@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/21/2016 08:09 AM, KONRAD Frederic wrote: >=20 >=20 > Le 21/06/2016 =C3=A0 15:16, Paolo Bonzini a =C3=A9crit : >> xlnx_dp_aux_push_tx_fifo takes an immediate uint8_t and a buffer lengt= h, >> which must be 1 because that is how many uint8_t's fit in a uint8_t. >> Sure enough, that is what xlnx_dp_write passes to it, but the function= >> is just weird. Therefore, make xlnx_dp_aux_push_tx_fifo look like >> xlnx_dp_aux_push_rx_fifo, taking a pointer to the buffer. >> >> Reported by Coverity. >=20 >> + case DP_AUX_WRITE_FIFO: { >> + uint8_t c =3D value; >> + xlnx_dp_aux_push_tx_fifo(s, &c, 1); >> break; >> + } >=20 > BTW do you need those braces here? Yes. The declaration of 'c' inside a case label causes (at least some versions of) gcc to gripe, if it is not in a {} scope. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --nbeaP2DM284HRrq2KUklNP8xVRHXXfFib Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXabxJAAoJEKeha0olJ0Nq9xoH+wXFpo0JU6w/jr9BIxWMWiZN PZFSNunOtzq9i6TCiuLo++1/qPRtfKrKSLmzbafKB2C3CH1rG4OplKnwe1w6T2Zh g9zTIqW96p0J5C2FAJXSboqKbrkAFl/5Tx8ZWBbXp65Ky3+s9EFD0FFqeA/0VgcA LAHzxUB0rqN9i5ek9MRNGH93h8veBbE81JBK7MkgK9mcNw64+khu9fSUlt0qFX2t j7vO4GO5HBW1Q+PmHOyQ3JXDgasRXSxr84zcdCkZby+JPc65Lx6EpnR6DnZgL7AF qo1q7HiQht7ac0brY67QiEPSN6oZPu4Sk6swnH0p0mDRV2au8IQaf8g6lYbOnzs= =F/xS -----END PGP SIGNATURE----- --nbeaP2DM284HRrq2KUklNP8xVRHXXfFib--