From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38622) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXnhz-0000OK-K4 for qemu-devel@nongnu.org; Mon, 22 Feb 2016 05:27:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXnhv-0006W6-Sb for qemu-devel@nongnu.org; Mon, 22 Feb 2016 05:27:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52889) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXnhv-0006Vw-Mk for qemu-devel@nongnu.org; Mon, 22 Feb 2016 05:27:11 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 526CD80519 for ; Mon, 22 Feb 2016 10:27:10 +0000 (UTC) Date: Mon, 22 Feb 2016 10:27:06 +0000 From: "Daniel P. Berrange" Message-ID: <20160222102706.GE28195@redhat.com> References: <1455927587-28033-1-git-send-email-eblake@redhat.com> <1455927587-28033-5-git-send-email-eblake@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1455927587-28033-5-git-send-email-eblake@redhat.com> Subject: Re: [Qemu-devel] [PATCH 04/17] ui: Shorten references into InputEvent Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Paolo Bonzini , Gerd Hoffmann , qemu-devel@nongnu.org, armbru@redhat.com, "Michael S. Tsirkin" On Fri, Feb 19, 2016 at 05:19:34PM -0700, Eric Blake wrote: > An upcoming patch will alter how simple unions, like InputEvent, > are laid out, which will impact all lines of the form 'evt->u.XXX'. > To minimize the impact of that patch, use a temporary variable to > reduce the number of lines needing modification when an internal > reference within InputEvent changes layout. > > There was one instance in hid.c:hid_pointer_event() where the code > was referring to evt->u.rel inside the case label where evt->u.abs > is the correct name; thankfully, both members of the union have the > same type, so it happened to work, but it is now cleaner. > > Signed-off-by: Eric Blake > --- > hw/char/escc.c | 12 +++++----- > hw/input/hid.c | 36 +++++++++++++++++------------- > hw/input/ps2.c | 27 ++++++++++++++--------- > hw/input/virtio-input-hid.c | 33 ++++++++++++++++----------- > replay/replay-input.c | 31 ++++++++++++++++---------- > ui/input-legacy.c | 26 +++++++++++++--------- > ui/input.c | 54 ++++++++++++++++++++++++++------------------- > 7 files changed, 130 insertions(+), 89 deletions(-) Reviewed-by: Daniel P. Berrange Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|