From patchwork Sun Jan 26 16:05:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 314195 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B44B32C007E for ; Mon, 27 Jan 2014 03:06:22 +1100 (EST) Received: from localhost ([::1]:55140 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7SE0-0001nC-AL for incoming@patchwork.ozlabs.org; Sun, 26 Jan 2014 11:06:20 -0500 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 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0QG107O006192 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 26 Jan 2014 11:01:01 -0500 Received: from redhat.com (vpn1-5-215.ams2.redhat.com [10.36.5.215]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id s0QG0vAG021052; Sun, 26 Jan 2014 11:00:58 -0500 Date: Sun, 26 Jan 2014 18:05:53 +0200 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org 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-Disposition: inline In-Reply-To: <1390735289-15563-1-git-send-email-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Alexey Kardashevskiy , Anthony Liguori Subject: [Qemu-devel] [PULL v2 12/35] tests: fix acpi to work on bigendian host X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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); \