From: "Jan Beulich" Subject: Re: [PATCH v4 04/17] x86/hvm: remove multiple open coded 'chunking' loops Date: Wed, 24 Jun 2015 14:09:51 +0100 Message-ID: <558AC83F0200007800088E94@mail.emea.novell.com> References: <1435145089-21999-1-git-send-email-paul.durrant@citrix.com> <1435145089-21999-5-git-send-email-paul.durrant@citrix.com> <558ABFD70200007800088E1C@mail.emea.novell.com> <9AAE0902D5BC7E449B7C8E4E778ABCD02596B8DF@AMSPEX01CL02.citrite.net> 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 1Z7kRE-0000or-Kb for xen-devel@lists.xenproject.org; Wed, 24 Jun 2015 13:10:00 +0000 In-Reply-To: <9AAE0902D5BC7E449B7C8E4E778ABCD02596B8DF@AMSPEX01CL02.citrite.net> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant Cc: Andrew Cooper , "Keir(Xen.org)" , "xen-devel@lists.xenproject.org" List-Id: xen-devel@lists.xenproject.org >>> On 24.06.15 at 14:59, wrote: >> -----Original Message----- >> From: Jan Beulich [mailto:JBeulich@suse.com] >> Sent: 24 June 2015 13:34 >> To: Paul Durrant >> Cc: Andrew Cooper; xen-devel@lists.xenproject.org; Keir (Xen.org) >> Subject: Re: [PATCH v4 04/17] x86/hvm: remove multiple open coded >> 'chunking' loops >> >> >>> On 24.06.15 at 13:24, wrote: >> > +static int hvmemul_phys_mmio_access( >> > + paddr_t gpa, unsigned int size, uint8_t dir, uint8_t **buffer) >> >> As much as the earlier offset you returned via indirection to the >> caller was unnecessary, the indirection here seems pointless too. >> All callers know how (or don't care) to update the buffer pointer. > > Ok. Personally I'd prefer one thing to be in charge of updating the pointer > though. Generally seconded, but not at the expense of producing worse code (which the extra indirection surely does). Jan