From patchwork Tue Nov 5 16:38: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: 21337 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 515C625B39 for ; Tue, 5 Nov 2013 16:38:46 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id kx10sf16151044pab.8 for ; Tue, 05 Nov 2013 08:38:45 -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=KpHW4XMywY6tKCZ+ZP19gVWRA3pjh+CDqskud511kA0=; b=hyq6+8U7KaB4WYGz1kE1ATVcb3icHrtBzpjpUE7jrZ3iGlCwA/oarnAh+hFmLoOYIF myosv0mxx/ne+0uyMfxtEoHbJJdz/ntmUdgmMUu71PWBz/GpvOYGvBPES3Jasd9I+jIR CgNE0/2Sk0bqpOu8OgJLa9+/0Kd8eNisCl0LdJQkpK/YQKS5pTUKR7nh92VPIOxiG1K9 VZSetQYrP8NpddL6OVhjehAfI/fLgzdx8Bi2wdPZCHe19AZoGRnze/O60VQlT6CvzXvj mpMOISExe4G/gmk1LjZ1639x7yqS1tye9+UPD9bHzbSDaU1tk3w3WV+C4wg4hO181/vy g9GA== X-Gm-Message-State: ALoCoQk1511eTaEf9PYqBH9EiWhOlKOfPf7fbJB5Cc1+ufTpnGCUrIR4uQGXFcVAKQ/u+Mxg+gjU X-Received: by 10.66.102.69 with SMTP id fm5mr7626421pab.24.1383669525374; Tue, 05 Nov 2013 08:38:45 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.2.102 with SMTP id 6ls280854qet.69.gmail; Tue, 05 Nov 2013 08:38:45 -0800 (PST) X-Received: by 10.52.227.165 with SMTP id sb5mr50954vdc.85.1383669525222; Tue, 05 Nov 2013 08:38:45 -0800 (PST) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id lw10si5409796vec.81.2013.11.05.08.38.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Nov 2013 08:38:45 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.182 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.182; Received: by mail-ve0-f182.google.com with SMTP id c14so2605714vea.41 for ; Tue, 05 Nov 2013 08:38:45 -0800 (PST) X-Received: by 10.220.47.10 with SMTP id l10mr476563vcf.32.1383669525116; Tue, 05 Nov 2013 08:38:45 -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 u4csp220003vcz; Tue, 5 Nov 2013 08:38:44 -0800 (PST) X-Received: by 10.204.230.68 with SMTP id jl4mr4205230bkb.3.1383669520555; 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 dy7si3659018bkc.210.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-0006fr-Lo; 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 8/9] bswap.h: Remove cpu_to_be64wu() Date: Tue, 5 Nov 2013 16:38:36 +0000 Message-Id: <1383669517-25598-9-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.182 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: Richard Henderson Reviewed-by: Michael S. Tsirkin --- 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 0348b97..f242244 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c @@ -101,7 +101,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);