Received: from eggs.gnu.org ([2001:4830:134:3::10]:34972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLFfz-0002Vm-E0 for qemu-devel@nongnu.org; Mon, 18 Jan 2016 14:41:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLFfw-0000HG-7q for qemu-devel@nongnu.org; Mon, 18 Jan 2016 14:41:19 -0500 Received: from e06smtp09.uk.ibm.com ([195.75.94.105]:35334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLFfv-0000Gi-U2 for qemu-devel@nongnu.org; Mon, 18 Jan 2016 14:41:16 -0500 Received: from localhost by e06smtp09.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 18 Jan 2016 19:41:13 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 36BAA1B0804B for ; Mon, 18 Jan 2016 19:41:14 +0000 (GMT) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u0IJfAao64946382 for ; Mon, 18 Jan 2016 19:41:10 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u0IJf9Nc015666 for ; Mon, 18 Jan 2016 12:41:09 -0700 From: Sascha Silbe In-Reply-To: <20160115120143.GB2432@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> Date: Mon, 18 Jan 2016 20:41:19 +0100 Message-ID: <87r3heiskg.fsf@oc4731375738.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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: "Dr. David Alan Gilbert" Cc: amit.shah@redhat.com, Cornelia Huck , quintela@redhat.com, qemu-devel@nongnu.org, mst@redhat.com Dear David, "Dr. David Alan Gilbert" writes: > +/* a variable length array (i.e. _type *_field) but we know the > + * length > + */ > +#define VMSTATE_STRUCT_VARRAY_POINTER_KNOWN(_field, _state, _num, _versi= on, _vmsd, _type) { \ [...] 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. 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... Sascha --=20 Softwareentwicklung Sascha Silbe, Niederhofenstra=C3=9Fe 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641