From patchwork Sun Aug 25 14:59: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: 19521 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f200.google.com (mail-ye0-f200.google.com [209.85.213.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B04B325E41 for ; Sun, 25 Aug 2013 14:59:44 +0000 (UTC) Received: by mail-ye0-f200.google.com with SMTP id r5sf2466078yen.3 for ; Sun, 25 Aug 2013 07:59:44 -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=FoHfZjNE0Q4w9ZcnzzPFEPl1moY1zPekchRCF0ZgjqM=; b=SuF0139M0NsJvfDS33ZIDWNbzCSeA4Zz9h+sw9yqMVUVpt7MDYnw4d0JnuhKflJPeu pVsTbPt/QfC1kRuLhQhM74R91ZybX61st0M43+xNjmPRQW0g6+mmGuYcw1+Xb0X6aamt iEI2xXBQSyt8rRlSwKCT0jF7/0i8ZUHdbA2fSYie8I6g6VoKN9m3X8w3GKfIt1ZxVVzY L2iykaXR4rLZH2fUPRJUS97wtm+tzQgmY9wVILLC25bQOZEZxLSroALCuf8pPAqf9xFM xj64ygy+avXV8z54a8zRXCtHjsmxi/wCAXdtX/nXyT8Kzy/PAna1EwaPoHS4TsCUnYHX TQSg== X-Received: by 10.236.109.134 with SMTP id s6mr3465647yhg.32.1377442784455; Sun, 25 Aug 2013 07:59:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.12.166 with SMTP id z6ls2071833qeb.18.gmail; Sun, 25 Aug 2013 07:59:44 -0700 (PDT) X-Received: by 10.52.232.165 with SMTP id tp5mr8388934vdc.11.1377442784316; Sun, 25 Aug 2013 07:59:44 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id b6si2474310veo.98.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 25 Aug 2013 07:59:44 -0700 (PDT) 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 m17so1534725vca.3 for ; Sun, 25 Aug 2013 07:59:44 -0700 (PDT) X-Gm-Message-State: ALoCoQlcksTN3Liq1o+9vpqh3JOVm2jfZ9P/ldix3bttDJOOcqoA5KnhyP+/nAkSha5GqkHvaG82 X-Received: by 10.220.206.195 with SMTP id fv3mr9974057vcb.15.1377442784163; Sun, 25 Aug 2013 07:59:44 -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 u4csp192682vcz; Sun, 25 Aug 2013 07:59:43 -0700 (PDT) X-Received: by 10.204.62.201 with SMTP id y9mr6592756bkh.23.1377442782213; Sun, 25 Aug 2013 07:59:42 -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 cy5si804182bkc.45.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: 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-0002t9-DE; 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 3/9] bswap.h: Remove le16_to_cpupu() Date: Sun, 25 Aug 2013 15:59:31 +0100 Message-Id: <1377442777-11066-4-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.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 le16_to_cpupu() with lduw_le_p(). Signed-off-by: Peter Maydell --- 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 e84a577..f8f45ab 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 2de27c5..e5231df 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -428,7 +428,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);