From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSPfw-0006yZ-Aj for qemu-devel@nongnu.org; Mon, 11 Jun 2018 12:28:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSPfv-0001Ns-8j for qemu-devel@nongnu.org; Mon, 11 Jun 2018 12:28:12 -0400 Date: Mon, 11 Jun 2018 19:27:57 +0300 From: "Michael S. Tsirkin" Message-ID: <20180611192510-mutt-send-email-mst@kernel.org> References: <20180611011501.10235-1-f4bug@amsat.org> <54eb6ae9-d7e0-8a4d-6bd4-f8f1d0f00b92@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <54eb6ae9-d7e0-8a4d-6bd4-f8f1d0f00b92@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v4 00/40] Use the IEC binary prefix definitions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , Thomas Huth , Stefan Weil , Nikunj A Dadhania , qemu-arm@nongnu.org, qemu-block@nongnu.org, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, qemu-s390x@nongnu.org, qemu-trivial@nongnu.org, Fabien Chouteau , Alistair Francis , Aurelien Jarno , Anthony Perard , Christian Borntraeger , Marek Vasut , Sagar Karandikar , David Gibson , Antony Pavlov , Artyom Tarasenko , Andrzej Zaborowski , Beniamino Galvani , Peter Crosthwaite , Chris Wulff , Dmitry Fleytman , "Edgar E . Iglesias" , Igor Mitsyanko , Max Filippov , Magnus Damm , Marcel Apfelbaum , Subbaraya Sundeep , Alberto Garcia , Mark Cave-Ayland , Keith Busch , Stefano Stabellini , Peter Maydell , Stefan Berger , Bastian Koppelmann , Paul Burton , Yongbok Kim , Peter Chubb , Yuval Shaia , =?iso-8859-1?Q?Herv=E9?= Poussineau , Alex Williamson , Markus Armbruster , Cornelia Huck , David Hildenbrand , Eduardo Habkost , Fam Zheng , Igor Mammedov , Jason Wang , Gerd Hoffmann , Kevin Wolf , Max Reitz , Paolo Bonzini , Michael Clark , Palmer Dabbelt , Jiri Slaby , Alexander Graf , Richard Henderson , Michael Walle , Jan Kiszka On Mon, Jun 11, 2018 at 10:55:17AM -0500, Eric Blake wrote: > On 06/10/2018 08:14 PM, Philippe Mathieu-Daud=E9 wrote: > > Hi, > >=20 > > This series: > >=20 > > - split the byte-based definitions from "qemu/cutils.h" to "qemu/unit= s.h" > > (this now triggers WARNING: 1 added file, does MAINTAINERS need up= dating?) > > - clean hw/ includes; > > - replace different constants used for byte size with their correspon= ding > > IEC binary prefix definitions. > >=20 > > Since v3: > > - use IEC binary prefix definitions (Stefan Weil) > > - rebased > > - added R-b tags > >=20 >=20 > > hw/net/ne2000.h | 5 ++-- > ... > > tests/test-qemu-opts.c | 7 +++--- > > scripts/checkpatch.pl | 1 + > > 135 files changed, 533 insertions(+), 431 deletions(-) > > create mode 100644 include/qemu/units.h > >=20 >=20 > At least monitor.c and vl.c are missing from this list; a more general = grep > shows that the following are all potential candidates for this cleanup: >=20 > $ git grep -n '[<>][<>]=3D [1-5]0' > disas/m68k.c:787: val >>=3D 10; > hw/mips/mips_malta.c:194: ram_size >>=3D 20; > hw/ppc/sam460ex.c:129: ram_size >>=3D 20; > hw/timer/sh_timer.c:112: case 4: freq >>=3D 10; break; Most likely not 4 kilobyte. > linux-user/mips/cpu_loop.c:641: code >>=3D= 10; > linux-user/mips/cpu_loop.c:664: code >>=3D 10; Seems to do with decoding machine code. Also unlikely to be in bytes. > monitor.c:3198: val <<=3D 20; > target/m68k/helper.c:386: size >>=3D 10; > target/m68k/helper.c:390: size >>=3D 10; > target/m68k/helper.c:394: size >>=3D 10; > target/xtensa/helper.c:729: sz >>=3D 20; > target/xtensa/helper.c:732: sz >>=3D 10; > vl.c:2793: sz <<=3D 20; > --=20 > Eric Blake, Principal Software Engineer > Red Hat, Inc. +1-919-301-3266 > Virtualization: qemu.org | libvirt.org