From patchwork Thu Apr 4 12:58:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 15925 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-gg0-f199.google.com (mail-gg0-f199.google.com [209.85.161.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 29E06277E2 for ; Thu, 4 Apr 2013 12:58:59 +0000 (UTC) Received: by mail-gg0-f199.google.com with SMTP id v2sf3346192ggc.10 for ; Thu, 04 Apr 2013 05:58:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references: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=WLti2nhUGB4BtgciK64N3brCtie0nfrjchUZMu62n/o=; b=IHNBX5duNLQQ0tMNzPM9aJXUVCl+YmsHMVnM8GUJF3Vn2+NTJYGVcNOP4dYySR99s7 6Gsz6xkgzWYuLp9gBusQZ2LpzSghlyS7aLoPDb+tOZAFEVE43/yC8hc7enOnwiV7I9DR qxAAJfOVYGvp3GN6bsWhI7CdozW647nXjx/i6JHHozc14MNhfWmjNMnlBI2lO9mJcc3+ He0PCwc7r2iWdNGZbaCebnL4TTuJYQhoQ0ACiHQ/SP1EABI/ybcwZcWH3RUdA10rx0KE Gi1wvir1dsC8aYnbg0V5sCPyieVfH1OOCpQdJOdTA1H5RoG2q/s19qj4c80GzCpq79No lGdg== X-Received: by 10.224.207.2 with SMTP id fw2mr3255156qab.6.1365080334000; Thu, 04 Apr 2013 05:58:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.106.163 with SMTP id gv3ls1390744qeb.88.gmail; Thu, 04 Apr 2013 05:58:53 -0700 (PDT) X-Received: by 10.220.203.130 with SMTP id fi2mr4527737vcb.52.1365080333840; Thu, 04 Apr 2013 05:58:53 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id xa7si8088984vdc.126.2013.04.04.05.58.53 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 04 Apr 2013 05:58:53 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id m16so529731vca.14 for ; Thu, 04 Apr 2013 05:58:53 -0700 (PDT) X-Received: by 10.58.238.65 with SMTP id vi1mr4603376vec.31.1365080333753; Thu, 04 Apr 2013 05:58:53 -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.58.85.136 with SMTP id h8csp214688vez; Thu, 4 Apr 2013 05:58:53 -0700 (PDT) X-Received: by 10.194.171.74 with SMTP id as10mr9527349wjc.0.1365080320518; Thu, 04 Apr 2013 05:58:40 -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 nh15si8466067wic.76.2013.04.04.05.58.40 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 04 Apr 2013 05:58:40 -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.72) (envelope-from ) id 1UNjkQ-0005RU-0B; Thu, 04 Apr 2013 13:58:34 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Arnd Bergmann , "Michael S. Tsirkin" , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Will Deacon , Paul Brook , Aurelien Jarno Subject: [PATCH v3 11/11] hw/versatile_pci: Drop unnecessary vpb_pci_config_addr() Date: Thu, 4 Apr 2013 13:58:33 +0100 Message-Id: <1365080313-20875-12-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1365080313-20875-1-git-send-email-peter.maydell@linaro.org> References: <1365080313-20875-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQnvq7xl0S27+DWKkmYUlaLyhBZQ0nzGjwjlZbEeM98djqfa5xZSKwr+3ptQSJL0yMiDiaws X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.169 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: , Drop the vpb_pci_config_addr() function -- it is unnecessary since the size of the memory regions means the hwaddr is always within the 24 bit size. (This function was probably a leftover from when read/write functions were called with absolute addresses rather than relative ones.) Signed-off-by: Peter Maydell Acked-by: Paul Brook --- hw/versatile_pci.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/hw/versatile_pci.c b/hw/versatile_pci.c index fa63b77..1baab98 100644 --- a/hw/versatile_pci.c +++ b/hw/versatile_pci.c @@ -214,11 +214,6 @@ static const MemoryRegionOps pci_vpb_reg_ops = { }, }; -static inline uint32_t vpb_pci_config_addr(hwaddr addr) -{ - return addr & 0xffffff; -} - static void pci_vpb_config_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { @@ -234,7 +229,7 @@ static void pci_vpb_config_write(void *opaque, hwaddr addr, } } } - pci_data_write(&s->pci_bus, vpb_pci_config_addr(addr), val, size); + pci_data_write(&s->pci_bus, addr, val, size); } static uint64_t pci_vpb_config_read(void *opaque, hwaddr addr, @@ -242,7 +237,7 @@ static uint64_t pci_vpb_config_read(void *opaque, hwaddr addr, { PCIVPBState *s = (PCIVPBState *)opaque; uint32_t val; - val = pci_data_read(&s->pci_bus, vpb_pci_config_addr(addr), size); + val = pci_data_read(&s->pci_bus, addr, size); return val; }