From: geoff@hostfission.com
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] ps2: Fix mouse stream corruption due to lost data
Date: Mon, 07 May 2018 22:38:57 +1000 [thread overview]
Message-ID: <a853e908526da003d76a1c871bcf576a@hostfission.com> (raw)
In-Reply-To: <20180507123453.2ef3zk54d7tqii3e@sirius.home.kraxel.org>
On 2018-05-07 22:34, Gerd Hoffmann wrote:
>> diff --git a/hw/input/ps2.c b/hw/input/ps2.c
>> index 6edf046820..011290920f 100644
>> --- a/hw/input/ps2.c
>> +++ b/hw/input/ps2.c
>> @@ -192,12 +192,50 @@ void ps2_queue(PS2State *s, int b)
>> {
>> PS2Queue *q = &s->queue;
>>
>> - if (q->count >= PS2_QUEUE_SIZE - 1)
>> + if (q->count == PS2_QUEUE_SIZE)
>> + {
>> + printf("Warning! PS2 Queue Overflow!\n");
>> return;
>> + }
>
> Leftover debug printf?
Correct :), I will remove it.
>
>> +void ps2_raise(PS2State *s)
>> +{
>> + s->update_irq(s->update_arg, 1);
>> +}
>> +
>> +void ps2_queue_raise(PS2State *s, int b)
>> +{
>> + ps2_queue(s, b);
>> + s->update_irq(s->update_arg, 1);
>> +}
>
> I'd suggest to keep the ps2_queue() name. Makes the patch much smaller
> and easier to review. Factor out the code to actually queue things to
> a new ps2_queue_noirq() function.
>
>> +void ps2_queue_bytes(PS2State *s, const int length, ...)
Ack.
>
> I'd prefer to not use vaargs here as gcc can't check the arguments
> then.
> Suggest to just have ps2_queue_{2,3,4}() helpers instead to queue
> multibyte messages.
Ack.
>
> cheers,
> Gerd
Thanks,
Geoff
prev parent reply other threads:[~2018-05-07 12:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-07 12:03 [Qemu-devel] [PATCH 2/2] ps2: Fix mouse stream corruption due to lost data geoff
2018-05-07 12:34 ` Gerd Hoffmann
2018-05-07 12:38 ` geoff [this message]
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=a853e908526da003d76a1c871bcf576a@hostfission.com \
--to=geoff@hostfission.com \
--cc=kraxel@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.