qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] migration: Don't use *_to_cpup()


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] migration: Don't use *_to_cpup()
Date: Fri, 10 Jun 2016 17:02:19 +0100

On 10 June 2016 at 16:05, Eric Blake <address@hidden> wrote:
> On 06/10/2016 09:01 AM, Peter Maydell wrote:
>> The *_to_cpup() functions just compose a pointer dereference with
>> a *_to_cpu() byteswap. Instead use ld*_p(), which handles potential
>> pointer misaligment and avoids the need to cast the pointer.
>
> s/misaligment/misalignment/
>
>>
>> Signed-off-by: Peter Maydell <address@hidden>
>> ---
>> The motivation here is that I'd like to get rid of _to_cpup()
>> entirely: we don't have many places that use it.
>> ---
>>  migration/migration.c | 12 ++++++------
>>  1 file changed, 6 insertions(+), 6 deletions(-)
>>
>
> Reviewed-by: Eric Blake <address@hidden>

Thanks. I just noticed that I missed the use of cpu_to_be64w()
for loads, so I'll send a v2.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]