diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-06-10 16:37:57 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2016-06-13 13:18:51 +0200 |
commit | ec9125bc0ef39bca89854df1bf568c78bf84050d (patch) | |
tree | c14c2ac984a8455782e560241e0d4225d451ff0f /hw/arm | |
parent | e058fa2dd599ccc780d334558be9c1d155222b80 (diff) | |
download | qemu-ec9125bc0ef39bca89854df1bf568c78bf84050d.tar.gz qemu-ec9125bc0ef39bca89854df1bf568c78bf84050d.tar.bz2 qemu-ec9125bc0ef39bca89854df1bf568c78bf84050d.zip |
hw/usb/dev-network.c: Use ldl_le_p() and stl_le_p()
Use stl_le_p() and ldl_le_p() to read and write data from
buffers, rather than using pointer casts and cpu_to_le32()
for writes and le32_to_cpup() for reads. This:
* avoids lots of casts
* works even if the buffer isn't as aligned as the host would like
* avoids using the *_to_cpup() functions which we want to get rid of
Note that there may still be some places where a pointer from the
guest is cast to a pointer to a host structure; these would also
have to be changed for the device to work on a host CPU which
enforces alignment restrictions.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1465573077-29221-1-git-send-email-peter.maydell@linaro.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/arm')
0 files changed, 0 insertions, 0 deletions