From patchwork Tue Nov 5 16:38:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 21341 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0EBF325B39 for ; Tue, 5 Nov 2013 16:38:54 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id gq1sf28131079obb.6 for ; Tue, 05 Nov 2013 08:38:53 -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=iBcIrFy6908SDP71IubQIEjA+tSPW/20xOcsNMV5LuM=; b=LZxZsGyx8YdXRIaoIjGx2TLHpd+T0qkGsk3CxRnUBLZlgrFG3W6H4Cb5xXIVnHvR3E XZPnPU4i6Y33RJqcB/FpnbU5FgfHJtZrnTZQe+uxm4DVsadiWkAOscPodfJ4lD1doC2x 3RtCc5Q0I6jvS8KnYRwDg3tMUYodsiWJuLAa69bxlB8AW65biiWvdpQpNcjZQanZV2Ge 42tawe2z1xVCd7o1MAQ9w7J8RhiOruaGFQdCARe+IpQW1Tne21GQpa0B3Vilcbyf5Yn8 ckt/QZkvvMIrjdKAkz3sBBSQeM3eT596sYC/OWTBy/Cy5F2goCfPMD/vaQho8tg1qWOu KI8w== X-Gm-Message-State: ALoCoQnqgtiFCVxo49Lka/WNBs/DCN4YWwnbjqzCheQgcNCo5McEkasXoEnAWwkqp2QUOplr5e8L X-Received: by 10.182.158.4 with SMTP id wq4mr7806545obb.18.1383669533656; Tue, 05 Nov 2013 08:38:53 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.119.166 with SMTP id kv6ls285445qeb.10.gmail; Tue, 05 Nov 2013 08:38:53 -0800 (PST) X-Received: by 10.58.182.166 with SMTP id ef6mr65464vec.58.1383669533560; Tue, 05 Nov 2013 08:38:53 -0800 (PST) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id ks3si5407276vec.89.2013.11.05.08.38.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Nov 2013 08:38:51 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.172 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.172; Received: by mail-vc0-f172.google.com with SMTP id ks9so5786066vcb.31 for ; Tue, 05 Nov 2013 08:38:51 -0800 (PST) X-Received: by 10.220.183.199 with SMTP id ch7mr702384vcb.27.1383669531700; Tue, 05 Nov 2013 08:38:51 -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 u4csp220013vcz; Tue, 5 Nov 2013 08:38:50 -0800 (PST) X-Received: by 10.204.108.195 with SMTP id g3mr19363bkp.143.1383669529254; Tue, 05 Nov 2013 08:38:49 -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 nm9si3654600bkb.321.2013.11.05.08.38.48 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 05 Nov 2013 08:38:49 -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-0006fT-Bv; 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 2/9] bswap.h: Remove cpu_to_le32wu() Date: Tue, 5 Nov 2013 16:38:30 +0000 Message-Id: <1383669517-25598-3-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.172 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 cpu_to_le32wu() with stl_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 a94cf74..9ba3d1e 100644 --- a/hw/net/ne2000.c +++ b/hw/net/ne2000.c @@ -467,7 +467,7 @@ static inline void ne2000_mem_writel(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)) { - cpu_to_le32wu((uint32_t *)(s->mem + addr), val); + stl_le_p(s->mem + addr, val); } } diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index fae2170..9cd0642 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -433,7 +433,7 @@ pci_get_word(const uint8_t *config) static inline void pci_set_long(uint8_t *config, uint32_t val) { - cpu_to_le32wu((uint32_t *)config, val); + stl_le_p(config, val); } static inline uint32_t diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h index ada1084..d0c4ff0 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 void cpu_to_le32wu(uint32_t *p, uint32_t v) -{ - stl_le_p(p, v); -} - static inline uint16_t le16_to_cpupu(const uint16_t *p) { return lduw_le_p(p);