From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: qemu-devel@nongnu.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
Marcel Apfelbaum <marcel.a@redhat.com>
Subject: [Qemu-devel] [PATCH] tests: fix acpi to work on bigendian host
Date: Mon, 13 Jan 2014 18:33:53 +1100 [thread overview]
Message-ID: <1389598433-21159-1-git-send-email-aik@ozlabs.ru> (raw)
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>
---
tests/acpi-test.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/acpi-test.c b/tests/acpi-test.c
index df1af83..30a5e3e 100644
--- a/tests/acpi-test.c
+++ b/tests/acpi-test.c
@@ -51,13 +51,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); \
--
1.8.4.rc4
next reply other threads:[~2014-01-13 7:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-13 7:33 Alexey Kardashevskiy [this message]
2014-01-14 10:52 ` [Qemu-devel] [PATCH] tests: fix acpi to work on bigendian host Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1389598433-21159-1-git-send-email-aik@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=marcel.a@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).