From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5FTh-00062g-BT for qemu-devel@nongnu.org; Mon, 20 Jan 2014 09:05:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5FTc-0001PL-B4 for qemu-devel@nongnu.org; Mon, 20 Jan 2014 09:05:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5FTc-0001PG-2V for qemu-devel@nongnu.org; Mon, 20 Jan 2014 09:05:20 -0500 Date: Mon, 20 Jan 2014 16:10:03 +0200 From: "Michael S. Tsirkin" Message-ID: <1390226872-781-13-git-send-email-mst@redhat.com> References: <1390226872-781-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1390226872-781-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 12/29] 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 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