From patchwork Tue Nov 5 16:38:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 21340 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f70.google.com (mail-qe0-f70.google.com [209.85.128.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D02E625B39 for ; Tue, 5 Nov 2013 16:38:50 +0000 (UTC) Received: by mail-qe0-f70.google.com with SMTP id 8sf16569076qea.1 for ; Tue, 05 Nov 2013 08:38:50 -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=Gwh16oWLJAdqVFj1sYQgapXMjtH/mga4+2GOXttQWPI=; b=ECrdGu0Wokcl6ZtnqYZOYabCQqZ+F1FLagxguECN1fHFRz5vA0sfyvWWErDxIE0T6O aLE/WKa4OMaDy4te2jvupgLS8MWGv2wh21dI0fgl6WnHzArvCXLrVR9o6H/1gciSyv98 ZqQAi4R27kNFPVPEAjF2QFirmsCcyfy75ZTC5RrINl9y04ZQwkPFbuGow40IfjdEoyXT PLgCI3Pu1MQ6uPTvlYZV430IgRTwUxc/QZWu/aryW13p2JEJarfLz4JH7tJHtMHTll1K ZOuPIzK9gBiWIdrSv4fQF6261dhW5QOzewpUUfaF1D1Jy191uo6tvZ1JcQrgeaoMC1JT l2xg== X-Gm-Message-State: ALoCoQleoz92ARbKgXzDueSGCUCzUG7P4Yfis2hrWSE1abgOTXQz/JkqA3zR4ll91ICEw1NrICTs X-Received: by 10.58.201.36 with SMTP id jx4mr2801496vec.35.1383669530675; Tue, 05 Nov 2013 08:38:50 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.3.129 with SMTP id c1ls253039qec.84.gmail; Tue, 05 Nov 2013 08:38:50 -0800 (PST) X-Received: by 10.220.174.200 with SMTP id u8mr16295472vcz.6.1383669530553; Tue, 05 Nov 2013 08:38:50 -0800 (PST) Received: from mail-vb0-f49.google.com (mail-vb0-f49.google.com [209.85.212.49]) by mx.google.com with ESMTPS id gu4si6727178vdc.85.2013.11.05.08.38.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Nov 2013 08:38:50 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.49 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.49; Received: by mail-vb0-f49.google.com with SMTP id w20so2499310vbb.22 for ; Tue, 05 Nov 2013 08:38:50 -0800 (PST) X-Received: by 10.220.186.202 with SMTP id ct10mr16592772vcb.14.1383669530310; Tue, 05 Nov 2013 08:38:50 -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 u4csp220012vcz; Tue, 5 Nov 2013 08:38:49 -0800 (PST) X-Received: by 10.14.1.130 with SMTP id 2mr25367545eed.24.1383669529069; 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 l47si5462965eep.22.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-0006fP-Ae; 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 1/9] bswap.h: Remove cpu_to_le16wu() Date: Tue, 5 Nov 2013 16:38:29 +0000 Message-Id: <1383669517-25598-2-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.212.49 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_le16wu() with stw_le_p(). Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Michael S. Tsirkin --- hw/acpi/core.c | 4 ++-- include/hw/pci/pci.h | 2 +- include/qemu/bswap.h | 5 ----- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/hw/acpi/core.c b/hw/acpi/core.c index d8dff5b..246ade3 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -170,8 +170,8 @@ static void acpi_table_install(const char unsigned *blob, size_t bloblen, } /* increase number of tables */ - cpu_to_le16wu((uint16_t *)acpi_tables, - le16_to_cpupu((uint16_t *)acpi_tables) + 1u); + stw_le_p(acpi_tables, + le16_to_cpupu((uint16_t *)acpi_tables) + 1u); /* Update the header fields. The strings need not be NUL-terminated. */ changed_fields = 0; diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 37ffa53..fae2170 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -421,7 +421,7 @@ pci_get_byte(const uint8_t *config) static inline void pci_set_word(uint8_t *config, uint16_t val) { - cpu_to_le16wu((uint16_t *)config, val); + stw_le_p(config, val); } static inline uint16_t diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h index 14a5f65..ada1084 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_le16wu(uint16_t *p, uint16_t v) -{ - stw_le_p(p, v); -} - static inline void cpu_to_le32wu(uint32_t *p, uint32_t v) { stl_le_p(p, v);