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 14:11:36 +0100 Message-ID: <56546208.1000000@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> <56545DFF.2040404@citrix.com> <56546EED02000078000B865B@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.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a1DNr-0004pG-KZ for xen-devel@lists.xenproject.org; Tue, 24 Nov 2015 13:11:47 +0000 In-Reply-To: <56546EED02000078000B865B@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 24/11/15 a les 14.06, Jan Beulich ha escrit: >>>> On 24.11.15 at 13:54, wrote: >> 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. > > Yes, I saw that, and while you could move in patch 2 I agree it > doesn't make much sense. > >> 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. > > At least d_ perhaps then? I've called it "desc", I hope it's fine. Roger.