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

Re: [Xen-devel] [PATCH v4 06/19] x86/boot/reloc: create generic alloc and copy functions



>>> On 11.08.16 at 16:12, <JBeulich@xxxxxxxx> wrote:
>>>> On 06.08.16 at 01:04, <daniel.kiper@xxxxxxxxxx> wrote:
>> --- a/xen/arch/x86/boot/reloc.c
>> +++ b/xen/arch/x86/boot/reloc.c
>> @@ -32,60 +32,69 @@ typedef unsigned int u32;
>>  
>>  static u32 alloc;
>>  
>> -static void *reloc_mbi_struct(void *old, unsigned int bytes)
>> +static u32 alloc_mem(u32 bytes)
> 
> Conversion of alloc to be of pointer type (in the earlier patch), and
> then making the return type here and ...
> 
>> +static u32 copy_mem(u32 src, u32 bytes)
> 
> ... all of the types here follow suit would apparently be quite
> beneficial to the number of casts needed.

Or maybe, considering patch 8, in a slight variation thereof: Do
the conversion as suggested, but have a helper wrapper of the
type above, taking care of all the casting. That way both the
actual implementation and the callers can stay (mostly) cast free.

Jan


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

 


Rackspace

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