Received: from [140.186.70.92] (port=56436 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q2Oqm-0002cI-Ll for qemu-devel@nongnu.org; Wed, 23 Mar 2011 10:15:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q2Oqk-0005dn-P4 for qemu-devel@nongnu.org; Wed, 23 Mar 2011 10:15:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q2Oqk-0005dM-AU for qemu-devel@nongnu.org; Wed, 23 Mar 2011 10:15:50 -0400 From: Juan Quintela In-Reply-To: <4D89E8B8.6010404@codemonkey.ws> (Anthony Liguori's message of "Wed, 23 Mar 2011 07:34:00 -0500") References: <1300839376-22520-1-git-send-email-aliguori@us.ibm.com> <1300839376-22520-8-git-send-email-aliguori@us.ibm.com> <4D89E8B8.6010404@codemonkey.ws> Date: Wed, 23 Mar 2011 15:14:06 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 07/11] eeprom93xx: Use the new hack macro to avoid duplicate field names Reply-To: quintela@redhat.com List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Jan Kiszka , Anthony Liguori , qemu-devel@nongnu.org Anthony Liguori wrote: > On 03/23/2011 04:58 AM, Juan Quintela wrote: >> Anthony Liguori wrote: >>> I don't fully understand this hack business but we need field to be unique so.. >>> >>> Signed-off-by: Anthony Liguori >>> --- >>> hw/eeprom93xx.c | 2 +- >>> 1 files changed, 1 insertions(+), 1 deletions(-) >>> >>> diff --git a/hw/eeprom93xx.c b/hw/eeprom93xx.c >>> index cfa695d..f1d75ec 100644 >>> --- a/hw/eeprom93xx.c >>> +++ b/hw/eeprom93xx.c >>> @@ -114,7 +114,7 @@ static const VMStateInfo vmstate_hack_uint16_from_uint8 = { >>> }; >>> >>> #define VMSTATE_UINT16_HACK_TEST(_f, _s, _t) \ >>> - VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_hack_uint16_from_uint8, uint16_t) >>> + VMSTATE_SINGLE_TEST_HACK(_f, _s, _t, 0, vmstate_hack_uint16_from_uint8, uint16_t) >>> >>> static bool is_old_eeprom_version(void *opaque, int version_id) >>> { > Could we get away with just doing: > > VMSTATE_UNUSED(3), > VMSTATE_UINT8(bar, ...), Remember that we are "supposed to be" big/little endian safe. > That's fully compatible on the wire and seems to be a clearer > expression of exactly what the problem is. if we are going to break big endian machines, I fully agree. Later, Juan.