From patchwork Sat Apr 6 15:44:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 15949 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 ADD1F26EC2 for ; Sat, 6 Apr 2013 15:44:59 +0000 (UTC) Received: by mail-gg0-f199.google.com with SMTP id v2sf6059130ggc.2 for ; Sat, 06 Apr 2013 08:44:49 -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=/gdRhwr6grdIhlbzhUb5V+Rw4v21kfLsR06NTBh9Whk=; b=YQTbQCh2m43hPuNT15/Y4y3PBIyaOWkPATK3dRDbacOz/zq7eXZdcCYoNy2djHhwTV cPi3PuCZ0e/LFcSOa99u5Rcwf8Jvk/ISa5+bQKfBFtC9GgulaRpY+Qiil1JakgaIjLQa E2mkl/nnSco2S3G/IUJgH6ZYfAAsTxVlH8Hs4M9YrqBADaMhLX6quscP90gs2j9EAcuk IB4o7CxCWDmiHv12HOH/OKNli9GQRcoeAJklDlnM5x80Q12S7QQjAdG/Q1T3Ij2Obtsz zM3krMKoX041YJ8xktAXs7mVGrUZuwPDCAbU5bT5vXn6tJkzaig+H9Cb2AwFe2FqTYl2 Fp5w== X-Received: by 10.224.219.146 with SMTP id hu18mr1483785qab.3.1365263089594; Sat, 06 Apr 2013 08:44:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.24.230 with SMTP id x6ls2296146qef.31.gmail; Sat, 06 Apr 2013 08:44:49 -0700 (PDT) X-Received: by 10.52.23.132 with SMTP id m4mr9507018vdf.87.1365263089507; Sat, 06 Apr 2013 08:44:49 -0700 (PDT) Received: from mail-vb0-x229.google.com (mail-vb0-x229.google.com [2607:f8b0:400c:c02::229]) by mx.google.com with ESMTPS id ex4si13843922vdb.27.2013.04.06.08.44.49 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 06 Apr 2013 08:44:49 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::229 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::229; Received: by mail-vb0-f41.google.com with SMTP id f13so2805128vbg.14 for ; Sat, 06 Apr 2013 08:44:49 -0700 (PDT) X-Received: by 10.59.4.101 with SMTP id cd5mr11403743ved.14.1365263089362; Sat, 06 Apr 2013 08:44:49 -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 h8csp296688vez; Sat, 6 Apr 2013 08:44:48 -0700 (PDT) X-Received: by 10.152.133.67 with SMTP id pa3mr8451039lab.44.1365263082830; Sat, 06 Apr 2013 08:44:42 -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 rm1si3607933lbb.210.2013.04.06.08.44.41 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 06 Apr 2013 08:44:42 -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 1UOVID-0004PW-BQ; Sat, 06 Apr 2013 16:44:37 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= , "Michael S. Tsirkin" , Paul Brook , Arnd Bergmann , Will Deacon Subject: [PATCH v4 11/11] hw/versatile_pci: Drop unnecessary vpb_pci_config_addr() Date: Sat, 6 Apr 2013 16:44:36 +0100 Message-Id: <1365263076-16909-12-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1365263076-16909-1-git-send-email-peter.maydell@linaro.org> References: <1365263076-16909-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQkd5C4iqzpIXoQlbPIueu+5aw8LjcV4PWn/bcESoku3EChfJ2E0Hig+Ri0aA3PCw82SciuA X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::229 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 e99f35f..540daf7 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 = 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; }