From: Gerd Hoffmann <kraxel@redhat.com>
To: Javier Celaya <jcelaya@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] Fix input-linux reading from device
Date: Mon, 27 Mar 2017 12:11:39 +0200 [thread overview]
Message-ID: <1490609499.31035.29.camel@redhat.com> (raw)
In-Reply-To: <20170326095349.8571-1-jcelaya@gmail.com>
On So, 2017-03-26 at 11:53 +0200, Javier Celaya wrote:
> The evdev devices in input-linux.c are read in blocks of one whole
> event. If there are not enough bytes available, they are discarded,
> instead of being kept for the next read operation. This results in
> lost events, of even non-working devices.
Have you seen this happening in practice?
> + struct input_event event;
> + int to_be_read;
I'd suggest to store offset (i.e. bytes already read) instead, should
make the whole logic a bit simpler and easier to read.
> + } else if (rc > 0){
checkpatch.pl complains here:
ERROR: space required before the open brace '{'
cheers,
Gerd
next prev parent reply other threads:[~2017-03-27 10:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-26 9:53 [Qemu-devel] [PATCH v2] Fix input-linux reading from device Javier Celaya
2017-03-27 10:11 ` Gerd Hoffmann [this message]
2017-03-27 11:30 ` Javier Celaya
2017-03-27 15:27 ` Philippe Mathieu-Daudé
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=1490609499.31035.29.camel@redhat.com \
--to=kraxel@redhat.com \
--cc=jcelaya@gmail.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.