[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 04/17] x86/hvm: remove multiple open coded 'chunking' loops



>>> On 24.06.15 at 14:59, <Paul.Durrant@xxxxxxxxxx> wrote:
>>  -----Original Message-----
>> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
>> Sent: 24 June 2015 13:34
>> To: Paul Durrant
>> Cc: Andrew Cooper; xen-devel@xxxxxxxxxxxxxxxxxxxx; Keir (Xen.org)
>> Subject: Re: [PATCH v4 04/17] x86/hvm: remove multiple open coded
>> 'chunking' loops
>> 
>> >>> On 24.06.15 at 13:24, <paul.durrant@xxxxxxxxxx> 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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.