From patchwork Sun Aug 25 14:59: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: 19523 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f199.google.com (mail-qc0-f199.google.com [209.85.216.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 93B34246F3 for ; Sun, 25 Aug 2013 14:59:46 +0000 (UTC) Received: by mail-qc0-f199.google.com with SMTP id n7sf2629685qcx.10 for ; Sun, 25 Aug 2013 07:59:46 -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=2UkuQuqSaxtHBqdNm5H/UIpu7tNn+rLal/4Pse8uSes=; b=Dr+AoMr2JT6I2tEY27XNOpMX9zHxo7NTaKIoSqrOCOUECIJF0B5ZILsW7gkuuVSBnW vvvUFqUlPI230m3FYGe2KFYFtCPXx5afava3FJF1BoOF+uPHV2RDsWVSFUe2xW+9JCH7 dIL90PHeIepXgpl1BE8S2BQ8QipGGeMhIsCXOTy3zBEcDdoderFWwoj5+vc8XB3164CY QyuGJSVydKr8pAuAh0U0TVLONPj5dmQz3tPxzI8BWJCmJ5cynQSqhE47KiZzH7MThdI0 ZOpwq+rg709336aKDidFBvFnDi/m/yjvCchKSGTJQQjeRUK8gph+Pw5gRaGEcVkd6wXI Q+4Q== X-Received: by 10.236.63.165 with SMTP id a25mr3527515yhd.43.1377442786183; Sun, 25 Aug 2013 07:59:46 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.83.7 with SMTP id m7ls2254034qey.0.gmail; Sun, 25 Aug 2013 07:59:46 -0700 (PDT) X-Received: by 10.220.105.199 with SMTP id u7mr9840282vco.1.1377442786105; Sun, 25 Aug 2013 07:59:46 -0700 (PDT) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by mx.google.com with ESMTPS id h4si2474654vdw.97.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 25 Aug 2013 07:59:46 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.178 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.178; Received: by mail-ve0-f178.google.com with SMTP id ox1so1514125veb.37 for ; Sun, 25 Aug 2013 07:59:46 -0700 (PDT) X-Gm-Message-State: ALoCoQnCd/hDww9lcfxYLOYtUb8PUSNQTpUJW1mKB9x4J/RN046FUShIXFPuACiUme/Pl4XmrLsv X-Received: by 10.221.51.206 with SMTP id vj14mr10036603vcb.17.1377442786005; Sun, 25 Aug 2013 07:59:46 -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 u4csp192684vcz; Sun, 25 Aug 2013 07:59:45 -0700 (PDT) X-Received: by 10.112.52.225 with SMTP id w1mr1392827lbo.31.1377442782971; Sun, 25 Aug 2013 07:59:42 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id kk3si2511860lbc.137.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: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1VDbn0-0002t1-3J; 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 1/9] bswap.h: Remove cpu_to_le16wu() Date: Sun, 25 Aug 2013 15:59:29 +0100 Message-Id: <1377442777-11066-2-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.178 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 --- 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 b07feda..e84a577 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 ccec2ba..ae82064 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -422,7 +422,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);