From patchwork Sun Aug 25 14:59: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: 19527 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f197.google.com (mail-ve0-f197.google.com [209.85.128.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 24CAF246F3 for ; Sun, 25 Aug 2013 14:59:54 +0000 (UTC) Received: by mail-ve0-f197.google.com with SMTP id ox1sf2625080veb.4 for ; Sun, 25 Aug 2013 07:59:53 -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=P4KoofMfacDuW+696tN6QN8+KUPDnhJ0R7kmng/SJls=; b=NJAh/sPwTd6O9IIRM9ei2D11N1b8i39RUFDCNzyv3ttdzR78nRNQFxQ3+fNOedjrBV c7ydVfly3dv7/A3JNI4SthkrDn9MPVGjYdWn2EgCTbHvOKZ6AJDqdBNv2l03lyG5q7jQ PLx87l0nR7Ljybxom8P1OPFvHh3P6BakpLgYahpFsls7eNgkL+KRiXp5RfTQpNAOSPFO Oak2jCa/mgsKxvjEm8K4Eiix1liIdkt6V0jkEQbVcggk56cHQ5TG3TJlwMBNJnqcSy4F bQvwJjNsOVcRjwklC0iv1AHnnun+ki/KldK8UOXqRrBKjJMxE2YyJPbxTdQHPZ+dpPU0 aD2A== X-Received: by 10.236.30.129 with SMTP id k1mr6293yha.56.1377442793828; Sun, 25 Aug 2013 07:59:53 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.59.132 with SMTP id z4ls2073870qeq.69.gmail; Sun, 25 Aug 2013 07:59:53 -0700 (PDT) X-Received: by 10.58.73.202 with SMTP id n10mr10080207vev.7.1377442793731; Sun, 25 Aug 2013 07:59:53 -0700 (PDT) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by mx.google.com with ESMTPS id h4si2489160vdw.32.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 25 Aug 2013 07:59:53 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.44 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.44; Received: by mail-vb0-f44.google.com with SMTP id e13so1532705vbg.3 for ; Sun, 25 Aug 2013 07:59:53 -0700 (PDT) X-Gm-Message-State: ALoCoQmAKiSH6uuQL9+m/uJm5Vb9KRbIXb/MV7mHXG2nodLknGl5EeYKXp+nVKpIMtIhVbkYm0+J X-Received: by 10.220.199.5 with SMTP id eq5mr9995198vcb.16.1377442793623; Sun, 25 Aug 2013 07:59: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.220.174.196 with SMTP id u4csp192691vcz; Sun, 25 Aug 2013 07:59:53 -0700 (PDT) X-Received: by 10.204.62.201 with SMTP id y9mr6593148bkh.23.1377442792496; Sun, 25 Aug 2013 07:59:52 -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 cy5si804233bkc.45.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 25 Aug 2013 07:59:52 -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-0002t5-8r; 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 2/9] bswap.h: Remove cpu_to_le32wu() Date: Sun, 25 Aug 2013 15:59:30 +0100 Message-Id: <1377442777-11066-3-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.212.44 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: 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 31afd28..e7865e9 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 ae82064..2de27c5 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -434,7 +434,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);