From nobody Wed Dec 17 05:46:18 2025 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1556639416; cv=none; d=zoho.com; s=zohoarc; b=AuMSafCqCMkWVmSAR5fkx4DdY77+nX/1gwqwmpeaJrHN8OfaY6aK1/glB4eukVICh181+SUANoyITbykJ2Z/WEvKWQOTIJPy0E6CSsF4ESwMD7G8tjcEif/tS5T70rq6BD/iZPMBqdAOuyHFKhto7WkN/+HhSRfVAy3YUeVKRow= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556639416; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=bFfvYi+ugVN+g6WtqcX/FNqA82cCVMes+EXGJFXnuqE=; b=ZqP6F+ZIi7VvqsRtScddUQlgFrUII5jQdD2drf2CewBshNhOw2gHrLjHK4qU+dIb+l35Iov4b2bZ3oAyYkL9qV773ZUgQslqqRiuCPkbTogWw0NZq6GrPhNF6IwT9M1Lmgk75atca2ufHyy7J/IOM9HXiUC8Xnz30B9ie3fPksQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 155663941663183.09379868854478; Tue, 30 Apr 2019 08:50:16 -0700 (PDT) Received: from localhost ([127.0.0.1]:48890 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLV15-0004ZC-4z for importer@patchew.org; Tue, 30 Apr 2019 11:49:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLUuo-0007yu-Re for qemu-devel@nongnu.org; Tue, 30 Apr 2019 11:43:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLUum-00023L-Va for qemu-devel@nongnu.org; Tue, 30 Apr 2019 11:43:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57091) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hLUuM-0001el-Ei; Tue, 30 Apr 2019 11:43:02 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A7B98D56F1; Tue, 30 Apr 2019 15:43:01 +0000 (UTC) Received: from linux.fritz.box.com (unknown [10.36.118.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 03C954C7; Tue, 30 Apr 2019 15:42:58 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Tue, 30 Apr 2019 17:42:22 +0200 Message-Id: <20190430154244.30083-6-kwolf@redhat.com> In-Reply-To: <20190430154244.30083-1-kwolf@redhat.com> References: <20190430154244.30083-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 30 Apr 2019 15:43:01 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 05/27] block/vhdx: Remove redundant IEC binary prefixes definition X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Stefano Garzarella IEC binary prefixes are already defined in "qemu/units.h", so we can remove redundant definitions in "block/vhdx.h". Signed-off-by: Stefano Garzarella Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: John Snow Signed-off-by: Kevin Wolf --- block/vhdx.h | 6 +----- block/vhdx.c | 3 ++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/block/vhdx.h b/block/vhdx.h index 1bfb4e4f73..bf72090c8f 100644 --- a/block/vhdx.h +++ b/block/vhdx.h @@ -17,11 +17,7 @@ =20 #ifndef BLOCK_VHDX_H #define BLOCK_VHDX_H - -#define KiB (1 * 1024) -#define MiB (KiB * 1024) -#define GiB (MiB * 1024) -#define TiB ((uint64_t) GiB * 1024) +#include "qemu/units.h" =20 #define DEFAULT_LOG_SIZE 1048576 /* 1MiB */ /* Structures and fields present in the VHDX file */ diff --git a/block/vhdx.c b/block/vhdx.c index b785aef4b7..7cd1fc3731 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -1889,7 +1889,8 @@ static int coroutine_fn vhdx_co_create(BlockdevCreate= Options *opts, return -EINVAL; } if (block_size > VHDX_BLOCK_SIZE_MAX) { - error_setg(errp, "Block size must not exceed %d", VHDX_BLOCK_SIZE_= MAX); + error_setg(errp, "Block size must not exceed %" PRId64, + VHDX_BLOCK_SIZE_MAX); return -EINVAL; } =20 --=20 2.20.1