From patchwork Mon Jul 8 08:44:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 18281 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 12EFC25DF6 for ; Mon, 8 Jul 2013 08:44:12 +0000 (UTC) Received: by mail-la0-f69.google.com with SMTP id lx15sf4416547lab.8 for ; Mon, 08 Jul 2013 01:44:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=7aH+zT3WMYKuWqthxymvT/uP2YWTYJALIhChIeREs64=; b=CK1BHGDB82cFCP2idN+oKiJVDnBbzo41VN/hlKNInSYVc8ca+b2a7aZtvSphmT7nIY lavFX4C+h5S6bG8F1LTuVZKkWgePQXD5skdS6aAO1ywN5ouDwDiy4Be88chgqifkpncz 7166mAsyu4JXL7B2fWd+uLD4VBJbHKFVNJBtPTEBmh9wRtmQvIdpRG4TuyxBYIqid1Ny mxJyeoF8B4E/h4cOlMce189jsPwBqEc7jB+55BM213Kq/29tY6QPG23F4s8f7dzX3Q0q 8q/cwfkFGDA8Cl9IZ2+nx7XT/by3BXFO3Qct2krJEJyCtQheqB1IswexcXkFN1N1DM6V wnCg== X-Received: by 10.180.88.104 with SMTP id bf8mr5519193wib.3.1373273051131; Mon, 08 Jul 2013 01:44:11 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.11.233 with SMTP id t9ls1404690wib.10.canary; Mon, 08 Jul 2013 01:44:10 -0700 (PDT) X-Received: by 10.180.73.68 with SMTP id j4mr12560093wiv.10.1373273050690; Mon, 08 Jul 2013 01:44:10 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id bz7si14136366wib.41.2013.07.08.01.44.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 08 Jul 2013 01:44:10 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id b10so3310296vea.2 for ; Mon, 08 Jul 2013 01:44:09 -0700 (PDT) X-Received: by 10.58.128.71 with SMTP id nm7mr13226032veb.51.1373273049337; Mon, 08 Jul 2013 01:44:09 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.149.77 with SMTP id s13csp161347vcv; Mon, 8 Jul 2013 01:44:08 -0700 (PDT) X-Received: by 10.15.110.10 with SMTP id cg10mr24088690eeb.57.1373273047775; Mon, 08 Jul 2013 01:44:07 -0700 (PDT) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id l7si15510278eey.300.2013.07.08.01.44.07 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 08 Jul 2013 01:44:07 -0700 (PDT) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1Uw73E-0004sf-V2; Mon, 08 Jul 2013 09:44:05 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Paolo Bonzini Subject: [PATCH] exec.c: Pass correct pointer type to qemu_ram_ptr_length Date: Mon, 8 Jul 2013 09:44:04 +0100 Message-Id: <1373273044-18736-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQmvH5x0P+Ka/Hlw3JUDWDcYVSxJbyseFIBEKhJh0qb1UdbfVnsmBWhWKqqn8loKEj+PsQ66 X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Commit e3127ae0 introduced a problem where we're passing a hwaddr* to qemu_ram_ptr_length() but it wants a ram_addr_t*; this will cause problems on 32 bit hosts and in any case provokes a clang warning on MacOSX: CC arm-softmmu/exec.o exec.c:2164:46: warning: incompatible pointer types passing 'hwaddr *' (aka 'unsigned long long *') to parameter of type 'ram_addr_t *' (aka 'unsigned long *') [-Wincompatible-pointer-types] return qemu_ram_ptr_length(raddr + base, plen); ^~~~ exec.c:1392:63: note: passing argument to parameter 'size' here static void *qemu_ram_ptr_length(ram_addr_t addr, ram_addr_t *size) ^ Since this function is only used in one place, change its prototype to pass a hwaddr* rather than a ram_addr_t*, rather than contorting the calling code to get the type right. Signed-off-by: Peter Maydell Tested-by: Riku Voipio Tested-by: Peter Crosthwaite --- exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 03fdf7e..50d29de 100644 --- a/exec.c +++ b/exec.c @@ -1389,7 +1389,7 @@ static void *qemu_safe_ram_ptr(ram_addr_t addr) /* Return a host pointer to guest's ram. Similar to qemu_get_ram_ptr * but takes a size argument */ -static void *qemu_ram_ptr_length(ram_addr_t addr, ram_addr_t *size) +static void *qemu_ram_ptr_length(ram_addr_t addr, hwaddr *size) { if (*size == 0) { return NULL;