From: Eric Blake <eblake@redhat.com>
To: KONRAD Frederic <fred.konrad@greensocs.com>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH] xlnx_dp: fix iffy xlnx_dp_aux_push_tx_fifo
Date: Tue, 21 Jun 2016 16:14:33 -0600 [thread overview]
Message-ID: <5769BC49.3020803@redhat.com> (raw)
In-Reply-To: <d2840177-c0ed-4dbf-0077-2dee46839f6e@greensocs.com>
[-- Attachment #1: Type: text/plain, Size: 931 bytes --]
On 06/21/2016 08:09 AM, KONRAD Frederic wrote:
>
>
> Le 21/06/2016 à 15:16, Paolo Bonzini a écrit :
>> xlnx_dp_aux_push_tx_fifo takes an immediate uint8_t and a buffer length,
>> 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.
>
>> + case DP_AUX_WRITE_FIFO: {
>> + uint8_t c = value;
>> + xlnx_dp_aux_push_tx_fifo(s, &c, 1);
>> break;
>> + }
>
> 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.
--
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 --]
next prev parent reply other threads:[~2016-06-21 22:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-21 13:16 [Qemu-devel] [PATCH] xlnx_dp: fix iffy xlnx_dp_aux_push_tx_fifo Paolo Bonzini
2016-06-21 13:16 ` [Qemu-devel] [PATCH] aux: fix break that wanted to break two levels out Paolo Bonzini
2016-07-04 17:29 ` Peter Maydell
2016-06-21 14:09 ` [Qemu-devel] [PATCH] xlnx_dp: fix iffy xlnx_dp_aux_push_tx_fifo KONRAD Frederic
2016-06-21 22:14 ` Eric Blake [this message]
2016-06-22 7:28 ` KONRAD Frederic
2016-07-04 17:30 ` Peter Maydell
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=5769BC49.3020803@redhat.com \
--to=eblake@redhat.com \
--cc=fred.konrad@greensocs.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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.