From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1af96o-0002kQ-EP for qemu-devel@nongnu.org; Sun, 13 Mar 2016 12:43:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1af96n-0004E5-MY for qemu-devel@nongnu.org; Sun, 13 Mar 2016 12:43:14 -0400 Received: from mail-vk0-x22c.google.com ([2607:f8b0:400c:c05::22c]:34033) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1af96n-0004E1-I3 for qemu-devel@nongnu.org; Sun, 13 Mar 2016 12:43:13 -0400 Received: by mail-vk0-x22c.google.com with SMTP id e185so184269936vkb.1 for ; Sun, 13 Mar 2016 09:43:13 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4B4AD1E7-485C-48AE-B350-7719E4DDE6EE@gmail.com> References: <8768A4C2-CEBF-411A-9B43-9F43EA755238@gmail.com> <41EC2072-FB9D-4003-A0CB-1DBFA0B2A27D@gmail.com> <4B4AD1E7-485C-48AE-B350-7719E4DDE6EE@gmail.com> From: Peter Maydell Date: Sun, 13 Mar 2016 16:42:53 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v4 4/4] hw/input/adb.c: implement QKeyCode support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Programmingkid Cc: Gerd Hoffmann , qemu-devel qemu-devel On 13 March 2016 at 16:39, Programmingkid wrote: > I did try this but a bunch of errors showed up. > /include/migration/vmstate.h:248:48: error: invalid operands to binary - (have 'uint8_t (*)[256]' and 'uint16_t (*)[128]') > #define type_check_array(t1,t2,n) ((t1(*)[n])0 - (t2*)0) > > /include/migration/vmstate.h:261:6: note: in expansion of macro 'type_check_array' > type_check_array(_type, typeof_field(_state, _field), _num)) > > So I'm not sure now changing the type to 16 bit is the best thing to do. It would require a lot more changes to other files. Right, you would need to also change the migration state to say the array was 16 bit. (This is a migration compat break, so awkward anyway.) I made a typo in that email which unfortunately completely reversed the meaning -- I meant to say "we should just take option (b)"... thanks -- PMM