From patchwork Wed Jan 2 11:08:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Bloch X-Patchwork-Id: 10746283 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3B88891E for ; Wed, 2 Jan 2019 11:10:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29C6528723 for ; Wed, 2 Jan 2019 11:10:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E568287CF; Wed, 2 Jan 2019 11:10:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EEA1A287DA for ; Wed, 2 Jan 2019 11:10:13 +0000 (UTC) Received: from localhost ([127.0.0.1]:43702 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1geePd-0002Ee-7F for patchwork-qemu-devel@patchwork.kernel.org; Wed, 02 Jan 2019 06:10:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1geeOY-0001Hm-UT for qemu-devel@nongnu.org; Wed, 02 Jan 2019 06:09:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1geeOV-00087f-R7 for qemu-devel@nongnu.org; Wed, 02 Jan 2019 06:09:06 -0500 Received: from mail-eopbgr700135.outbound.protection.outlook.com ([40.107.70.135]:5886 helo=NAM04-SN1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1geeOV-00085B-Hi; Wed, 02 Jan 2019 06:09:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janustech.onmicrosoft.com; s=selector1-janustech-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FtcjQo26YwCkmkOh1K9mospKrVaEw8qmykt5huSRNLs=; b=gLvv24A1d3ytG/ZI+Yp9JoRwM4ORXxARHnhyVqlH4Iv0sUzVQAL52lJjEB3583oddoQn+GtlXnOTsm1a4GBLyOGXSqpbWsErxcbs+k9OVz6Z5dnBm8wCQAC+U8SODj8+dL0Ebo25rCb0X4pBeLnXxT97SaDmALZvX9uQOcX8Mqk= Received: from CY1PR07MB2619.namprd07.prod.outlook.com (10.167.16.145) by CY1PR07MB2538.namprd07.prod.outlook.com (10.167.16.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1495.6; Wed, 2 Jan 2019 11:08:57 +0000 Received: from CY1PR07MB2619.namprd07.prod.outlook.com ([fe80::64b4:97dd:3f6f:c474]) by CY1PR07MB2619.namprd07.prod.outlook.com ([fe80::64b4:97dd:3f6f:c474%3]) with mapi id 15.20.1471.019; Wed, 2 Jan 2019 11:08:57 +0000 From: Leonid Bloch To: "qemu-devel@nongnu.org" Thread-Topic: [PATCH 0/1] include: Auto-generate the sizes lookup table Thread-Index: AQHUoouOro+gleWn70GCxcTm0Fg0tw== Date: Wed, 2 Jan 2019 11:08:56 +0000 Message-ID: <20190102110804.18155-1-lbloch@janustech.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: LO2P265CA0126.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9f::18) To CY1PR07MB2619.namprd07.prod.outlook.com (2a01:111:e400:c637::17) authentication-results: spf=none (sender IP is ) smtp.mailfrom=lbloch@janustech.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [37.26.148.152] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY1PR07MB2538; 6:ZkioieqLnZxh3lZtznLxFS18MvKbvLUMOiPtyjRScV8WWtVvvggQFK12P+5OOlPCwWlzRmcr9tTEmkgMQDV4Df2LpKnQ39cyXbT0f4QVIpa3KeB2ZYbfYIJFelGG9RjrrNZMgCuC/F0QDI776VIHyZLdeN6NDr/OO4lGM9dhCoXn3RXOJk/9k0in1As5SR7X5CzYrkLS3UwuDqLEPfznIa5yII8LkqMnp7yWaw8tx6xpgQSypHeDWw1fDf38k8WTUQ8W76FlPGnGjHEJvXnmdLB0JoKj7FMlvO1hhhtGpmX7L7DO/SSq1l1tIu5UwgzixrjCb7uavLa+b6Mra91NMBIaugrZO1dsASINT1rNARDS8ICP+rKMIIWz0vi1Xx8e2wwAQad8Zg+tlXyW0XYMrzf33//SQ6OIah7hpAsVWS7xMbpF5Xh0yYMP6zUvDNXj/4/mqCE7V/2/n2h4SE0jzQ==; 5:3sZAyi7M/x7i+uo+WiYdh58A4sIghMcIz6ee1+rX5L/WCR7tQqbBTdHOhi+ntKUOLpDfuNkXY4CqSKl7sbB7Tzw0RMaKUZoO77RjoYqTnjlDqCReVJHM8w1cedY26XJEmk6EmtV8yO0r3atFaZ1Z/kDbVVeSzBPPqm9OC8m4wks2AxorFAoIsOUJ9e5RbWGfwpTULbgQm/jrB6yOMcb8Bw==; 7:ZUetNy5Zam47SOKf0GtMuNShUrYY5VJRHW73QfXZPB0jkL1heyqoCHhUS0ybSOG0Oguq4S1y5U6rXiDqNGWOPeX6BWclzd1GgK6mKYN2TX02n4VARw6pemL4p+/4QUULjThrMY/wSBJFDUKUuJw5Jg== x-ms-office365-filtering-correlation-id: 38647573-5bf7-4a2b-3cfe-08d670a2b039 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020); SRVR:CY1PR07MB2538; x-ms-traffictypediagnostic: CY1PR07MB2538: x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(3230021)(908002)(999002)(5005026)(6040522)(8220060)(2401047)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231475)(944501520)(52105112)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(201708071742011)(7699051)(76991095); SRVR:CY1PR07MB2538; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2538; x-forefront-prvs: 0905A6B2C7 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(346002)(366004)(39830400003)(396003)(136003)(199004)(189003)(6116002)(3846002)(99286004)(14454004)(102836004)(97736004)(316002)(6436002)(2351001)(5640700003)(486006)(1076003)(6916009)(26005)(476003)(6486002)(25786009)(966005)(478600001)(6506007)(54906003)(5660300001)(68736007)(386003)(2616005)(52116002)(186003)(53936002)(71190400001)(8936002)(71200400001)(256004)(6306002)(6512007)(36756003)(106356001)(66066001)(305945005)(105586002)(7736002)(2501003)(4326008)(8676002)(81156014)(81166006)(86362001)(2906002); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR07MB2538; H:CY1PR07MB2619.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:3; received-spf: None (protection.outlook.com: janustech.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: m/hgadUoPAGRS3ewe4wUY5wJUvdIQb7Bnl7lxa8Wnp5Rkaw+6TpKd4xobW08+ZdCeWvPjVAPbTfJTTAT9bgKzhYFl+OT1GV7m/mVFkCtERfFgkaqFBzP59//jzkZyQNwCXNHo5amZNDhxCQSBnWeZZXUyBTh/ye8CsVfgRqPqKylxyt/6yCDuAetSWLlUBnLN7/wrFv7b4HaAbT/BLgkYWZRO/qyvjcLlGGbkPI3FgbBIwOole/50WXPFKZ0T3EZTc6RBWQ4Y3Jr85yBIj2Zm/ylFnic1CFtfQdSm90gLVsXz8UQDp+aV5lifW4y6O9Z spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: janustech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 38647573-5bf7-4a2b-3cfe-08d670a2b039 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jan 2019 11:08:56.9623 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 34eb020e-3cf3-43a1-afeb-f5cf1310628e X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2538 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.70.135 Subject: [Qemu-devel] [PATCH 0/1] include: Auto-generate the sizes lookup table 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: Kevin Wolf , Alberto Garcia , "qemu-block@nongnu.org" , Stefan Weil , Markus Armbruster , Max Reitz , Leonid Bloch , =?iso-8859-1?q?Philippe_Mathieu-Daud=E9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Following the conversations here: https://patchwork.kernel.org/patch/10665157 and here: https://patchwork.kernel.org/patch/10666975 Making the lookup table for power-of-two sizes auto-generated, instead of being hard-coded into the units.h file. I'm not sure if the changes I've made to Makefile here are "standard". Please correct me if that's not the case. Sorry it took so much time - I was busy with something completely different. Regards, Leonid. Leonid Bloch (1): include: Auto-generate the sizes lookup table .gitignore | 1 + Makefile | 5 +++ block/qcow2.h | 2 +- block/vdi.c | 1 + include/qemu/units.h | 73 -------------------------------------------- scripts/gen-sizes.sh | 66 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 74 insertions(+), 74 deletions(-) create mode 100755 scripts/gen-sizes.sh