From patchwork Sun Aug 25 14:59:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 19520 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f198.google.com (mail-gh0-f198.google.com [209.85.160.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 01510246F3 for ; Sun, 25 Aug 2013 14:59:43 +0000 (UTC) Received: by mail-gh0-f198.google.com with SMTP id r13sf2477740ghr.9 for ; Sun, 25 Aug 2013 07:59:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=7Oh3+c+OwzfeX3/EJmbmoO+l3SXEip8V5rKN98wRkzs=; b=i0wMLJwhh2ZEGOolzUOFGanJAo00NKf5e486wp0vyxH+fdJAnfEYa2Zr0ziGqjlHd9 eBfywwF1BAONcvituZY0Annx/6pdgNk2n4ZWQXS7iM5pLdCHhhqAxLquvIiQIa6K0i9L 2JHJPUTvl1ADddJ9uItpw4Ns31uq/UaWkXcL2NEnavqUcn02wGEKXfQcr1SLKsK63GlL n1Ey4uEQXOLHFZSEIoOZ1wMTGNq1Q6LYdXwmLvaK8G8Y77SDAC9ANFXPw9W4Vgk8K8qj HqLBFWyGTqTqM5SqwznkUWujCFwwNbW6NHAgplIWbkj+k2cO1t94k+oVBCOp5pNRWBwq SSMQ== X-Received: by 10.236.17.161 with SMTP id j21mr269326yhj.55.1377442783507; Sun, 25 Aug 2013 07:59:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.107.200 with SMTP id he8ls2101599qeb.70.gmail; Sun, 25 Aug 2013 07:59:43 -0700 (PDT) X-Received: by 10.52.0.238 with SMTP id 14mr8029406vdh.3.1377442783418; Sun, 25 Aug 2013 07:59:43 -0700 (PDT) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id to10si2486313vdc.44.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 25 Aug 2013 07:59:43 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.174 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.174; Received: by mail-ve0-f174.google.com with SMTP id d10so1496260vea.5 for ; Sun, 25 Aug 2013 07:59:43 -0700 (PDT) X-Gm-Message-State: ALoCoQk6xmPkdKgweRK+dTs3pL0QMJovc3AoMzJGutxM0b+/J4XVGOLC1Be2orbwKHru5TMkI4Y1 X-Received: by 10.220.43.19 with SMTP id u19mr9960484vce.3.1377442783255; Sun, 25 Aug 2013 07:59:43 -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.174.196 with SMTP id u4csp192681vcz; Sun, 25 Aug 2013 07:59:42 -0700 (PDT) X-Received: by 10.180.189.37 with SMTP id gf5mr4533982wic.31.1377442782093; Sun, 25 Aug 2013 07:59: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 h8si2652637wiy.13.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 25 Aug 2013 07:59: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.80) (envelope-from ) id 1VDbn0-0002tD-I7; Sun, 25 Aug 2013 15:59:38 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Kevin Wolf , Stefan Hajnoczi , "Michael S. Tsirkin" , Richard Henderson , Anthony Liguori Subject: [PATCH 4/9] bswap.h: Remove le32_to_cpupu() Date: Sun, 25 Aug 2013 15:59:32 +0100 Message-Id: <1377442777-11066-5-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1377442777-11066-1-git-send-email-peter.maydell@linaro.org> References: <1377442777-11066-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.174 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: , Replace the legacy le32_to_cpupu() with ldl_le_p(). Signed-off-by: Peter Maydell Reviewed-by: Stefan Hajnoczi --- hw/net/ne2000.c | 2 +- include/hw/pci/pci.h | 2 +- include/qemu/bswap.h | 5 ----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c index e7865e9..5088e65 100644 --- a/hw/net/ne2000.c +++ b/hw/net/ne2000.c @@ -497,7 +497,7 @@ static inline uint32_t ne2000_mem_readl(NE2000State *s, uint32_t addr) addr &= ~1; /* XXX: check exact behaviour if not even */ if (addr < 32 || (addr >= NE2000_PMEM_START && addr < NE2000_MEM_SIZE)) { - return le32_to_cpupu((uint32_t *)(s->mem + addr)); + return ldl_le_p(s->mem + addr); } else { return 0xffffffff; } diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index e5231df..76d67a4 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -440,7 +440,7 @@ pci_set_long(uint8_t *config, uint32_t val) static inline uint32_t pci_get_long(const uint8_t *config) { - return le32_to_cpupu((const uint32_t *)config); + return ldl_le_p(config); } static inline void diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h index 1c50002..ac5b2e0 100644 --- a/include/qemu/bswap.h +++ b/include/qemu/bswap.h @@ -412,11 +412,6 @@ static inline void stfq_be_p(void *ptr, float64 v) /* Legacy unaligned versions. Note that we never had a complete set. */ -static inline uint32_t le32_to_cpupu(const uint32_t *p) -{ - return ldl_le_p(p); -} - static inline uint32_t be32_to_cpupu(const uint32_t *p) { return ldl_be_p(p);