From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Subject: Re: [PATCH v3 1/4] xen/save: pass a size parameter to the HVM compat functions Date: Tue, 24 Nov 2015 13:54:23 +0100 Message-ID: <56545DFF.2040404@citrix.com> References: <1447864631-4174-1-git-send-email-roger.pau@citrix.com> <1447864631-4174-2-git-send-email-roger.pau@citrix.com> <564F4C3502000078000B7430@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a1D7B-0003d9-Ov for xen-devel@lists.xenproject.org; Tue, 24 Nov 2015 12:54:33 +0000 In-Reply-To: <564F4C3502000078000B7430@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel@lists.xenproject.org, Ian Jackson , Ian Campbell , Tim Deegan List-Id: xen-devel@lists.xenproject.org El 20/11/15 a les 16.37, Jan Beulich ha escrit: >>>> On 18.11.15 at 17:37, wrote: >> --- a/xen/include/xen/hvm/save.h >> +++ b/xen/include/xen/hvm/save.h >> @@ -60,6 +60,8 @@ void _hvm_read_entry(struct hvm_domain_context *h, >> */ >> #define _hvm_load_entry(_x, _h, _dst, _strict) ({ \ >> int r; \ >> + struct hvm_save_descriptor *d \ >> + = (struct hvm_save_descriptor *)&(_h)->data[(_h)->cur]; \ > > This would seem to belong in the else if() body below. Also I > don't think "d" is a suitable name for a variable inside a macro > (albeit the same would apply to "r" too). Patch #2 makes use of "d" in the first "if" branch also. I don't think it makes much sense to put it inside of the "else if" branch if I have to move it in the following patch. Regarding the name, I don't have a strong opinion, desc is more descriptive, but it's also longer which means I might have to break some lines inside of the macro even more. Roger.