tests: fix acpi to work on bigendian host
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Mon, 13 Jan 2014 07:33:53 +0000 (18:33 +1100)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 26 Jan 2014 11:06:49 +0000 (13:06 +0200)
Double endianness convertion make this test failing on POWERPC machine
running in big-endian.

This fixes the test to success on big-endian host.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
tests/acpi-test.c

index 89c4b81..b5ab70a 100644 (file)
@@ -61,13 +61,13 @@ typedef struct {
             field = readb(addr);               \
             break;                             \
         case 2:                                \
-            field = le16_to_cpu(readw(addr));  \
+            field = readw(addr);               \
             break;                             \
         case 4:                                \
-            field = le32_to_cpu(readl(addr));  \
+            field = readl(addr);               \
             break;                             \
         case 8:                                \
-            field = le64_to_cpu(readq(addr));  \
+            field = readq(addr);               \
             break;                             \
         default:                               \
             g_assert(false);                   \