Patchwork [17/28] pc-testdev: remove useless cpu_to_le64/le64_to_cpu

login
register
mail settings
Submitter Paolo Bonzini
Date July 22, 2013, 1:54 p.m.
Message ID <1374501278-31549-18-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/260749/
State New
Headers show

Comments

Paolo Bonzini - July 22, 2013, 1:54 p.m.
So far the device was only used on little-endian machines.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/misc/pc-testdev.c | 2 --
 1 file changed, 2 deletions(-)

Patch

diff --git a/hw/misc/pc-testdev.c b/hw/misc/pc-testdev.c
index 6588ea2..ad1aa66 100644
--- a/hw/misc/pc-testdev.c
+++ b/hw/misc/pc-testdev.c
@@ -129,7 +129,6 @@  static uint64_t test_iomem_read(void *opaque, hwaddr addr, unsigned len)
     PCTestdev *dev = opaque;
     uint64_t ret = 0;
     memcpy(&ret, &dev->iomem_buf[addr], len);
-    ret = le64_to_cpu(ret);
 
     return ret;
 }
@@ -138,7 +137,6 @@  static void test_iomem_write(void *opaque, hwaddr addr, uint64_t val,
                              unsigned len)
 {
     PCTestdev *dev = opaque;
-    val = cpu_to_le64(val);
     memcpy(&dev->iomem_buf[addr], &val, len);
     dev->iomem_buf[addr] = val;
 }