From patchwork Sun Aug 25 14:59:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 19526 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f199.google.com (mail-ye0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4B9F2246F3 for ; Sun, 25 Aug 2013 14:59:53 +0000 (UTC) Received: by mail-ye0-f199.google.com with SMTP id l13sf2460843yen.6 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=dDbUobr+kODwjRjgkUFLkvWN6lklKUUQcC6IZo70tPw=; b=DcVnXKjWP1JsGF36kAKE05wjX7PeVG5PgW6rQ+Z/J7q/fZqMx4WNngu8Sv8UHYEBlj 6k/xAi63+JZhvU3chphrgogXxDCnzbvdNugUL/YqbmnGQ1GXz5ga5ZDik2IpSGH4NIyz N6bFHNR+qLZzjdtaTa6O0/OK/TK8IM425JPh0nv2IJL9IgLDk/8pP4tB2UBBkEHR58Vf vXqZxkmM17BDr9FRa1sAf6FFtwOSAjLXg35YJiG+Q/ytlU4QCd25CVsm6TgYQyd7j4nN nMnB1U0fesT9Y1vK9tv3D4wKp2oatdckn8Js4b00LYqK5I9sJ31P9BpqPZJp1rymGSxc E3nQ== X-Received: by 10.236.115.198 with SMTP id e46mr3792542yhh.33.1377442793060; Sun, 25 Aug 2013 07:59:53 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.71.83 with SMTP id s19ls1998000qeu.7.gmail; Sun, 25 Aug 2013 07:59:52 -0700 (PDT) X-Received: by 10.220.74.69 with SMTP id t5mr1590115vcj.18.1377442792959; Sun, 25 Aug 2013 07:59:52 -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 ed9si2477348vcb.81.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 25 Aug 2013 07:59:52 -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 e13so1532703vbg.3 for ; Sun, 25 Aug 2013 07:59:52 -0700 (PDT) X-Gm-Message-State: ALoCoQnRAdUvaVyLMNRG2ApMr1v6Dwu6qnXn7ASsVSQOfO7B8U8SXtr04NGtMeM/WplnUO7ygQQ3 X-Received: by 10.58.100.234 with SMTP id fb10mr10101386veb.5.1377442792880; Sun, 25 Aug 2013 07:59:52 -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 u4csp192690vcz; Sun, 25 Aug 2013 07:59:52 -0700 (PDT) X-Received: by 10.152.37.103 with SMTP id x7mr1511199laj.28.1377442791532; Sun, 25 Aug 2013 07:59:51 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id ds1si2108680lac.136.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 25 Aug 2013 07:59:51 -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 1VDbn1-0002tT-2z; Sun, 25 Aug 2013 15:59:39 +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 8/9] bswap.h: Remove cpu_to_be64wu() Date: Sun, 25 Aug 2013 15:59:36 +0100 Message-Id: <1377442777-11066-9-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_be64wu() with stq_be_p(). Signed-off-by: Peter Maydell Reviewed-by: Stefan Hajnoczi --- block/qcow2-cluster.c | 2 +- include/qemu/bswap.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index cca76d4..363a725 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c @@ -92,7 +92,7 @@ int qcow2_grow_l1_table(BlockDriverState *bs, uint64_t min_size, /* set new table */ BLKDBG_EVENT(bs->file, BLKDBG_L1_GROW_ACTIVATE_TABLE); cpu_to_be32w((uint32_t*)data, new_l1_size); - cpu_to_be64wu((uint64_t*)(data + 4), new_l1_table_offset); + stq_be_p(data + 4, new_l1_table_offset); ret = bdrv_pwrite_sync(bs->file, offsetof(QCowHeader, l1_size), data,sizeof(data)); if (ret < 0) { goto fail; diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h index b95cc73..4cbd6e7 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_be64wu(uint64_t *p, uint64_t v) -{ - stq_be_p(p, v); -} - static inline void cpu_to_32wu(uint32_t *p, uint32_t v) { stl_p(p, v);