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

2016-06-13 Thread Paolo Bonzini
On 10/06/2016 17:00, Peter Maydell wrote: > The *_to_cpup() functions are not very useful, as they simply do > a pointer dereference and then a *_to_cpu(). Instead use either: > * ld*_*_p(), if the data is at an address that might not be >correctly aligned for the load > * a local

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

2016-06-10 Thread Eric Blake
On 06/10/2016 09:00 AM, Peter Maydell wrote: > The *_to_cpup() functions are not very useful, as they simply do > a pointer dereference and then a *_to_cpu(). Instead use either: > * ld*_*_p(), if the data is at an address that might not be >correctly aligned for the load > * a local

[Qemu-devel] [PATCH] nbd: Don't use *_to_cpup() functions

2016-06-10 Thread Peter Maydell
The *_to_cpup() functions are not very useful, as they simply do a pointer dereference and then a *_to_cpu(). Instead use either: * ld*_*_p(), if the data is at an address that might not be correctly aligned for the load * a local dereference and *_to_cpu(), if the pointer is the correct