From patchwork Tue Nov 5 16:38:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 21336 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3622625B39 for ; Tue, 5 Nov 2013 16:38:44 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id i4sf2386599oah.5 for ; Tue, 05 Nov 2013 08:38:43 -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=BbrXaC49N+nuX9qHiflW71GtbEV6zaq5pkXqKMXrXU8=; b=lc8aC/bsraayvaE1ZvBxn3fWuYRNLIFd4FYQHXepAS8sneXC2eGU1mLpSYG+3WJ9eH Nb2RyFuV9vOQh/1R+++RwgR0DTJtE3u4w3HTX/mguS1t97/79AM66oBHywzhC04TkVlS glIwqxeRzyxRwlqa6WVd27akYy1cyESLb4pVl+wKT+yhOaGgNwQ5+eX5216401rVn4Ji qYFRv6hjdRC/fSZY+KW12IM177M+Ny9zrC8p1DNHY3ujAKJS3+5BX8bfmBALYJn4jtfp db7/k6vPtdbsiwssb1ZrwDYwb2nf1Dfc5qkTWf8mYQ4kzhzTWRkAL6knr+jINXIQFGTO OmBQ== X-Gm-Message-State: ALoCoQm5Z+2wq0oBKIvLJVlG12fqHUTfCSQFX0PcWaYzpeEh1FPkHBTEXIDJo4F3cPI2ZoKYoFW4 X-Received: by 10.50.61.242 with SMTP id t18mr7766252igr.3.1383669523673; Tue, 05 Nov 2013 08:38:43 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.97.67 with SMTP id dy3ls273165qeb.95.gmail; Tue, 05 Nov 2013 08:38:43 -0800 (PST) X-Received: by 10.220.161.74 with SMTP id q10mr61857vcx.61.1383669523573; Tue, 05 Nov 2013 08:38:43 -0800 (PST) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id dl10si5412980veb.57.2013.11.05.08.38.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Nov 2013 08:38:43 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.170 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.170; Received: by mail-ve0-f170.google.com with SMTP id oy12so2738690veb.1 for ; Tue, 05 Nov 2013 08:38:43 -0800 (PST) X-Received: by 10.220.186.202 with SMTP id ct10mr16592523vcb.14.1383669523478; Tue, 05 Nov 2013 08:38:43 -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 u4csp219998vcz; Tue, 5 Nov 2013 08:38:42 -0800 (PST) X-Received: by 10.180.38.34 with SMTP id d2mr17751394wik.31.1383669520462; Tue, 05 Nov 2013 08:38:40 -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 pv3si2323781wjc.150.2013.11.05.08.38.39 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 05 Nov 2013 08:38:40 -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-0006fX-DQ; 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 3/9] bswap.h: Remove le16_to_cpupu() Date: Tue, 5 Nov 2013 16:38:31 +0000 Message-Id: <1383669517-25598-4-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.128.170 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 le16_to_cpupu() with lduw_le_p(). Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Michael S. Tsirkin --- hw/acpi/core.c | 3 +-- include/hw/pci/pci.h | 2 +- include/qemu/bswap.h | 5 ----- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/hw/acpi/core.c b/hw/acpi/core.c index 246ade3..58308a3 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -170,8 +170,7 @@ static void acpi_table_install(const char unsigned *blob, size_t bloblen, } /* increase number of tables */ - stw_le_p(acpi_tables, - le16_to_cpupu((uint16_t *)acpi_tables) + 1u); + stw_le_p(acpi_tables, lduw_le_p(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 9cd0642..9c961a9 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -427,7 +427,7 @@ pci_set_word(uint8_t *config, uint16_t val) static inline uint16_t pci_get_word(const uint8_t *config) { - return le16_to_cpupu((const uint16_t *)config); + return lduw_le_p(config); } static inline void diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h index d0c4ff0..1c50002 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 uint16_t le16_to_cpupu(const uint16_t *p) -{ - return lduw_le_p(p); -} - static inline uint32_t le32_to_cpupu(const uint32_t *p) { return ldl_le_p(p);