From nobody Wed Feb 11 03:25:57 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1528680549647963.6153128574982; Sun, 10 Jun 2018 18:29:09 -0700 (PDT) Received: from localhost ([::1]:45745 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSBds-00070A-Tb for importer@patchew.org; Sun, 10 Jun 2018 21:29:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSBRY-0005K9-Ck for qemu-devel@nongnu.org; Sun, 10 Jun 2018 21:16:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSBRX-0002yX-G2 for qemu-devel@nongnu.org; Sun, 10 Jun 2018 21:16:24 -0400 Received: from mail-qt0-x234.google.com ([2607:f8b0:400d:c0d::234]:42500) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fSBRX-0002yN-Bk; Sun, 10 Jun 2018 21:16:23 -0400 Received: by mail-qt0-x234.google.com with SMTP id y31-v6so18837862qty.9; Sun, 10 Jun 2018 18:16:23 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id o5-v6sm28237223qtm.60.2018.06.10.18.16.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Jun 2018 18:16:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=URI5vXq1/Pq4eTrMDKrrT8V6K5VVTyPtLTtqCCDfXmk=; b=VShdoAThjKTiYPuqv84RZcrzx4r/yA8XGhG96IH2CuIY3jpbP6glAaGWsHECapddyL Zq2+lcVDzDd2KtU/wl71D38YdH0ZmzO2LwSPzdWbq5LqpRYdtLL5Hm330myuMtSE2Tdo Wo/MstpOU293TDhYW/8EVR2aj4W0iY8Fvl+ESao2znAwbx0nh/so3ilNYERgGF0RNxzO MKJtbKj03cx9Dfqep7XTRJF5tI13ESPF9BcOtuAJ3O+t51JMRDTlMoXrZbhMrTepE7uK 6A7U3uUEL7z0fhC1GBepB7GXVSdy2M63rSWyj/wPPas5GdrneSzXFI6kVUMT/7vKFZYi iBVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=URI5vXq1/Pq4eTrMDKrrT8V6K5VVTyPtLTtqCCDfXmk=; b=cUIL5omZjwCUoHub7TMk6662O96fOVL3G32tpfhz408jHeV6eB5sFQkjK+SOvjcyso Oan+wxkU/B4+pv3JirDvkHNZsTQe4o4FKt3jojupMOEP+MiPeYoepbXW3hsormvniCRg I5FId+I0Fgmjb7vRbY6CD7VatcMvVjBMpgJQFad5LmWIEA5JN6dlry0A2R7JZ6vZNCKK LXcxNwm4w4WHUpGmbzV1Xe5Rada+Nb9+tCglWQCDZv+Eq/X7HGz71PdEwa6q7Tug3yiw PEwQ27BJ88/wf3tlh2QHa6zzdh3kADZkEtdpxaQJmXOq4rn7/Q41WPPFxUpj6lUl2VJA zkcg== X-Gm-Message-State: APt69E1ywtacRBfaStLpG4Jqy897XgX8D0dk0z9GdJDBKDc937oOr3QS E617p+2gsCYPiZRaddnw6MM= X-Google-Smtp-Source: ADUXVKILa7Ibkd8MP4G3Q8eg6z5WxnHBRZoNVmkk593d4+IA9qoVf9wEBALp8Qri+/s2xLAWQVjFxw== X-Received: by 2002:aed:3942:: with SMTP id l60-v6mr14805563qte.67.1528679782978; Sun, 10 Jun 2018 18:16:22 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Thomas Huth , Stefan Weil Date: Sun, 10 Jun 2018 22:14:36 -0300 Message-Id: <20180611011501.10235-16-f4bug@amsat.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180611011501.10235-1-f4bug@amsat.org> References: <20180611011501.10235-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::234 Subject: [Qemu-devel] [PATCH v4 15/40] hw/misc: Use the IEC binary prefix definitions 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: qemu-trivial@nongnu.org, Jiri Slaby , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/misc/auxbus.c | 3 ++- hw/misc/edu.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/misc/auxbus.c b/hw/misc/auxbus.c index b4cacd664b..b8a8721201 100644 --- a/hw/misc/auxbus.c +++ b/hw/misc/auxbus.c @@ -27,6 +27,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/units.h" #include "qemu/log.h" #include "hw/misc/auxbus.h" #include "hw/i2c/i2c.h" @@ -68,7 +69,7 @@ AUXBus *aux_init_bus(DeviceState *parent, const char *nam= e) =20 /* Memory related. */ bus->aux_io =3D g_malloc(sizeof(*bus->aux_io)); - memory_region_init(bus->aux_io, OBJECT(bus), "aux-io", (1 << 20)); + memory_region_init(bus->aux_io, OBJECT(bus), "aux-io", 1 * MiB); address_space_init(&bus->aux_addr_space, bus->aux_io, "aux-io"); return bus; } diff --git a/hw/misc/edu.c b/hw/misc/edu.c index 34eb05d213..df26a4d046 100644 --- a/hw/misc/edu.c +++ b/hw/misc/edu.c @@ -23,6 +23,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/units.h" #include "hw/pci/pci.h" #include "hw/pci/msi.h" #include "qemu/timer.h" @@ -357,7 +358,7 @@ static void pci_edu_realize(PCIDevice *pdev, Error **er= rp) edu, QEMU_THREAD_JOINABLE); =20 memory_region_init_io(&edu->mmio, OBJECT(edu), &edu_mmio_ops, edu, - "edu-mmio", 1 << 20); + "edu-mmio", 1 * MiB); pci_register_bar(pdev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &edu->mmio); } =20 --=20 2.17.1