From patchwork Tue Nov 5 16:38: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: 21342 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f199.google.com (mail-vc0-f199.google.com [209.85.220.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 51A1025B39 for ; Tue, 5 Nov 2013 16:39:55 +0000 (UTC) Received: by mail-vc0-f199.google.com with SMTP id ia6sf15963214vcb.6 for ; Tue, 05 Nov 2013 08:39:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version: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=hAYk8LgSVvYv1+EHJETyIoUpPAEWL2NrupWl8HP/xh4=; b=I8XDQBHDM3OtyNz/dzRsJ79Bly1NJNY6XLNJ/6Y1/UJ4iSxvpjeSX3Z+HdPw1hpp82 dKmKKcmXCE4xZ3m+4Wivkuh9LlfA7CiKmqgsu1fx7SBwed3JFXI9vhsJcA5VJg1+7orV IlDiGnWoaXS9he74Am5JJY96eI3nNu5TVhEqsl4xT0chSktX6uDLuOUMRfKJKlxw8mxL Ca2SL7VVsRxGIs53XoyPUACmGGJhkT9sZ2hBMRdXN29GLJ3AgVQW0kUfYKf3WGtBwATW 6FlV/xQR/wCj+hQu8v0x5vSMW5ZALy0dtzRyeflFuhUlqq4Uo3ElcoSZ3JJQHkgS4cCS vxsA== X-Gm-Message-State: ALoCoQl++Rbq/AQtq/O4gUmu7NEkZ0DZTDPpg25+KYQubxbokgIxJD1OvDsHEXfXw5V2qypNacIr X-Received: by 10.236.17.161 with SMTP id j21mr484506yhj.55.1383669595053; Tue, 05 Nov 2013 08:39:55 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.60.68 with SMTP id f4ls290127qer.72.gmail; Tue, 05 Nov 2013 08:39:55 -0800 (PST) X-Received: by 10.58.100.244 with SMTP id fb20mr7130799veb.6.1383669594966; Tue, 05 Nov 2013 08:39:54 -0800 (PST) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id z9si5412105veh.70.2013.11.05.08.39.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Nov 2013 08:39:54 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.173 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.173; Received: by mail-vc0-f173.google.com with SMTP id lh4so5666388vcb.4 for ; Tue, 05 Nov 2013 08:39:54 -0800 (PST) X-Received: by 10.220.47.205 with SMTP id o13mr65217vcf.57.1383669594747; Tue, 05 Nov 2013 08:39:54 -0800 (PST) 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 u4csp220081vcz; Tue, 5 Nov 2013 08:39:54 -0800 (PST) X-Received: by 10.180.221.67 with SMTP id qc3mr17525309wic.14.1383669593664; Tue, 05 Nov 2013 08:39:53 -0800 (PST) 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 ek2si2634370wid.24.2013.11.05.08.39.53 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 05 Nov 2013 08:39:53 -0800 (PST) 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 1VdjeH-0006fb-F9; Tue, 05 Nov 2013 16:38:37 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: Anthony Liguori , patches@linaro.org, Kevin Wolf , Stefan Hajnoczi , "Michael S. Tsirkin" , Richard Henderson Subject: [PATCH v2 4/9] bswap.h: Remove le32_to_cpupu() Date: Tue, 5 Nov 2013 16:38:32 +0000 Message-Id: <1383669517-25598-5-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1383669517-25598-1-git-send-email-peter.maydell@linaro.org> References: <1383669517-25598-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.220.173 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: Richard Henderson Reviewed-by: Michael S. Tsirkin --- 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 9ba3d1e..4c32e9e 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 9c961a9..b783e68 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -439,7 +439,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);