mirror of https://github.com/xqemu/xqemu.git
pc-testdev: remove useless cpu_to_le64/le64_to_cpu
So far the device was only used on little-endian machines. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1374501278-31549-18-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
b7faba7163
commit
504054357b
|
@ -129,7 +129,6 @@ static uint64_t test_iomem_read(void *opaque, hwaddr addr, unsigned len)
|
||||||
PCTestdev *dev = opaque;
|
PCTestdev *dev = opaque;
|
||||||
uint64_t ret = 0;
|
uint64_t ret = 0;
|
||||||
memcpy(&ret, &dev->iomem_buf[addr], len);
|
memcpy(&ret, &dev->iomem_buf[addr], len);
|
||||||
ret = le64_to_cpu(ret);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -138,7 +137,6 @@ static void test_iomem_write(void *opaque, hwaddr addr, uint64_t val,
|
||||||
unsigned len)
|
unsigned len)
|
||||||
{
|
{
|
||||||
PCTestdev *dev = opaque;
|
PCTestdev *dev = opaque;
|
||||||
val = cpu_to_le64(val);
|
|
||||||
memcpy(&dev->iomem_buf[addr], &val, len);
|
memcpy(&dev->iomem_buf[addr], &val, len);
|
||||||
dev->iomem_buf[addr] = val;
|
dev->iomem_buf[addr] = val;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue