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

Re: [Xen-devel] [PATCH 2/3] grant-table: refactor grant copy to reduce duplicate code



On 22/01/15 14:24, Jan Beulich wrote:
>>>> On 20.01.15 at 19:19, <david.vrabel@xxxxxxxxxx> wrote:
>> +static int gnttab_copy_buf(const struct gnttab_copy *op,
>> +                           struct gnttab_copy_buf *dest,
>> +                           const struct gnttab_copy_buf *src)
>> +{
>> +    s16 rc;
> 
> An s16 local variable used as return value in a function returning
> int is kind of odd. Elsewhere there are also cases where the
> function return types are also s16. I don't think that's particularly
> efficient, and hence I think it should be changed in the places
> where you add new helpers even if the original code used s16
> for that purpose.

I was (trying to) use s16 where we return a GNTST_* value instead of the
usual -ERRNO.  I can change them all to int if this is preferred
(although I not sure I get your efficiency argument).

>> -    gnttab_mark_dirty(dd, d_frame);
> 
> This one doesn't reappear anywhere.

Oops!

David

_______________________________________________
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®.