nbd: Don't use *_to_cpup() functions
commit2317b328bc599458b9b40afb77cc7f42edbf41fd
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 10 Jun 2016 15:00:36 +0000 (10 16:00 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 5 Aug 2016 21:19:04 +0000 (5 16:19 -0500)
treee62c7a07e122e30b05ba801adc22ef8636cb5888
parentce00e529bc4039907321e24b402c4c2aa92ab750
nbd: Don't use *_to_cpup() functions

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 type and known to be correctly aligned

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <1465570836-22211-1-git-send-email-peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 773dce3c7286a66c37f7b07994177faf7046bfa8)
* context prereq for 7423f417
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
nbd/client.c
nbd/server.c
qemu-nbd.c