From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7S8y-0002Bp-TA for qemu-devel@nongnu.org; Sun, 26 Jan 2014 11:01:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W7S8t-0000XY-T5 for qemu-devel@nongnu.org; Sun, 26 Jan 2014 11:01:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7S8t-0000XT-Ln for qemu-devel@nongnu.org; Sun, 26 Jan 2014 11:01:03 -0500 Date: Sun, 26 Jan 2014 18:05:53 +0200 From: "Michael S. Tsirkin" Message-ID: <1390735289-15563-13-git-send-email-mst@redhat.com> References: <1390735289-15563-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1390735289-15563-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL v2 12/35] tests: fix acpi to work on bigendian host List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , Anthony Liguori From: Alexey Kardashevskiy 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 Signed-off-by: Michael S. Tsirkin --- 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 89c4b81..b5ab70a 100644 --- a/tests/acpi-test.c +++ b/tests/acpi-test.c @@ -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); \ -- MST