From patchwork Wed Feb 22 10:15:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mitsyanko Igor X-Patchwork-Id: 142431 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AA1FBB6F9F for ; Wed, 22 Feb 2012 21:16:44 +1100 (EST) Received: from localhost ([::1]:57613 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S09FP-00082X-SX for incoming@patchwork.ozlabs.org; Wed, 22 Feb 2012 05:16:31 -0500 Received: from eggs.gnu.org ([140.186.70.92]:55236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S09F7-0007qC-Mn for qemu-devel@nongnu.org; Wed, 22 Feb 2012 05:16:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S09F2-0004yr-1J for qemu-devel@nongnu.org; Wed, 22 Feb 2012 05:16:13 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:17679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S09F1-0004xq-TN for qemu-devel@nongnu.org; Wed, 22 Feb 2012 05:16:08 -0500 Received: from euspt2 (mailout1.w1.samsung.com [210.118.77.11]) by mailout1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0LZS006UTHUUGT@mailout1.w1.samsung.com> for qemu-devel@nongnu.org; Wed, 22 Feb 2012 10:16:06 +0000 (GMT) Received: from dodo.rnd.samsung.ru ([106.109.8.162]) by spt2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LZS000YXHUI73@spt2.w1.samsung.com> for qemu-devel@nongnu.org; Wed, 22 Feb 2012 10:16:06 +0000 (GMT) Date: Wed, 22 Feb 2012 14:15:52 +0400 From: Igor Mitsyanko In-reply-to: <1329905754-11873-1-git-send-email-i.mitsyanko@samsung.com> To: qemu-devel@nongnu.org Message-id: <1329905754-11873-4-git-send-email-i.mitsyanko@samsung.com> MIME-version: 1.0 X-Mailer: git-send-email 1.7.4.1 Content-type: TEXT/PLAIN Content-transfer-encoding: 7BIT References: <1329905754-11873-1-git-send-email-i.mitsyanko@samsung.com> X-detected-operating-system: by eggs.gnu.org: Solaris 9.1 X-Received-From: 210.118.77.11 Cc: peter.maydell@linaro.org, balrog@zabor.org, Igor Mitsyanko , e.voevodin@samsung.com, quintela@redhat.com, kyungmin.park@samsung.com, d.solodkiy@samsung.com, m.kozlov@samsung.com, afaerber@suse.de Subject: [Qemu-devel] [PATCH 3/5] hw/pxa2xx_lcd.c: drop VMSTATE_UINTTL usage 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 Convert three variables in DMAChannel state from type target_phys_addr_t to uint32_t, use VMSTATE_UINT32 instead of VMSTATE_UINTTL for these variables. We can do it safely because: 1) pxa2xx has 32-bit physical address; 2) rest of the code in this file treats these variables as uint32_t; 3) we shouldn't have used VMSTATE_UINTTL in the first place because this macro is for target_ulong type (which can be different from target_phys_addr_t). Signed-off-by: Igor Mitsyanko Reviewed-by: Peter Maydell --- hw/pxa2xx_lcd.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/pxa2xx_lcd.c b/hw/pxa2xx_lcd.c index 9495226..4b712bb 100644 --- a/hw/pxa2xx_lcd.c +++ b/hw/pxa2xx_lcd.c @@ -19,15 +19,15 @@ #include "framebuffer.h" struct DMAChannel { - target_phys_addr_t branch; + uint32_t branch; uint8_t up; uint8_t palette[1024]; uint8_t pbuffer[1024]; void (*redraw)(PXA2xxLCDState *s, target_phys_addr_t addr, int *miny, int *maxy); - target_phys_addr_t descriptor; - target_phys_addr_t source; + uint32_t descriptor; + uint32_t source; uint32_t id; uint32_t command; }; @@ -934,11 +934,11 @@ static const VMStateDescription vmstate_dma_channel = { .minimum_version_id = 0, .minimum_version_id_old = 0, .fields = (VMStateField[]) { - VMSTATE_UINTTL(branch, struct DMAChannel), + VMSTATE_UINT32(branch, struct DMAChannel), VMSTATE_UINT8(up, struct DMAChannel), VMSTATE_BUFFER(pbuffer, struct DMAChannel), - VMSTATE_UINTTL(descriptor, struct DMAChannel), - VMSTATE_UINTTL(source, struct DMAChannel), + VMSTATE_UINT32(descriptor, struct DMAChannel), + VMSTATE_UINT32(source, struct DMAChannel), VMSTATE_UINT32(id, struct DMAChannel), VMSTATE_UINT32(command, struct DMAChannel), VMSTATE_END_OF_LIST()