From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLTeg-00072h-HE for qemu-devel@nongnu.org; Tue, 19 Jan 2016 05:37:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLTeD-0007VA-5r for qemu-devel@nongnu.org; Tue, 19 Jan 2016 05:36:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLTeC-0007U6-UK for qemu-devel@nongnu.org; Tue, 19 Jan 2016 05:36:25 -0500 Date: Tue, 19 Jan 2016 10:36:19 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20160119103619.GB2398@work-vm> References: <1452083019-15141-1-git-send-email-dgilbert@redhat.com> <1452083019-15141-2-git-send-email-dgilbert@redhat.com> <871t9jhnfs.fsf@oc4731375738.ibm.com> <20160115092419.GA2432@work-vm> <20160115120143.GB2432@work-vm> <87r3heiskg.fsf@oc4731375738.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <87r3heiskg.fsf@oc4731375738.ibm.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/2] migration/virtio: Remove simple .get/.put use List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sascha Silbe Cc: amit.shah@redhat.com, Cornelia Huck , quintela@redhat.com, qemu-devel@nongnu.org, mst@redhat.com * Sascha Silbe (silbe@linux.vnet.ibm.com) wrote: > Dear David, >=20 > "Dr. David Alan Gilbert" writes: >=20 > > +/* a variable length array (i.e. _type *_field) but we know the > > + * length > > + */ > > +#define VMSTATE_STRUCT_VARRAY_POINTER_KNOWN(_field, _state, _num, _v= ersion, _vmsd, _type) { \ > [...] >=20 > Thinking about it some more, wouldn't VMSTATE_STRUCT_ARRAY_POINTER be a > better name? Like with VMSTATE_ARRAY, the size of the array is known at > compile-time. It's just that you need to dereference it first, hence > ..._POINTER. There's nothing variable about it at all. t's all a bit confusing; but the only pattern I'd figured out was that th= e things after the 'VARRAY_' part tended to be talking about the length of the array rather than the contents. > But keep in mind I don't understand the current naming scheme in the > first place, e.g. VMSTATE_ARRAY_INT32_UNSAFE vs. VMSTATE_VARRAY_INT32, > with both of them specifying VMS_VARRAY_INT32... No, I don't really either; one for Juan or Amit to suggest if they prefer one or the other. Dave >=20 > Sascha > --=20 > Softwareentwicklung Sascha Silbe, Niederhofenstra=DFe 5/1, 71229 Leonbe= rg > https://se-silbe.de/ > USt-IdNr. DE281696641 >=20 -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK