qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Thomas Huth" <thuth@redhat.com>, "Stefan Weil" <sw@weilnetz.de>,
	"Nikunj A Dadhania" <nikunj@linux.vnet.ibm.com>,
	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" <chouteau@adacore.com>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Anthony Perard" <anthony.perard@citrix.com>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	"Marek Vasut" <marex@denx.de>,
	"Sagar Karandikar" <sagark@eecs.berkeley.edu>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Antony Pavlov" <antonynpavlov@gmail.com>,
	"Artyom Tarasenko" <atar4qemu@gmail.com>,
	"Andrzej Zaborowski" <balrogg@gmail.com>,
	"Beniamino Galvani" <b.galvani@gmail.com>,
	"Peter Crosthwaite" <crosthwaite.peter@gmail.com>,
	"Chris Wulff" <crwulff@gmail.com>,
	"Dmitry Fleytman" <dmitry.fleytman@gmail.com>,
	"Edgar E . Iglesias" <edgar.iglesias@gmail.com>,
	"Igor Mitsyanko" <i.mitsyanko@gmail.com>,
	"Max Filippov" <jcmvbkbc@gmail.com>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Subbaraya Sundeep" <sundeep.lkml@gmail.com>,
	"Alberto Garcia" <berto@igalia.com>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Keith Busch" <keith.busch@intel.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Stefan Berger" <stefanb@linux.vnet.ibm.com>,
	"Bastian Koppelmann" <kbastian@mail.uni-paderborn.de>,
	"Paul Burton" <paul.burton@mips.com>,
	"Yongbok Kim" <yongbok.kim@mips.com>,
	"Peter Chubb" <peter.chubb@nicta.com.au>,
	"Yuval Shaia" <yuval.shaia@oracle.com>,
	"Hervé Poussineau" <hpoussin@reactos.org>,
	"Alex Williamson" <alex.williamson@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Fam Zheng" <famz@redhat.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Kevin Wolf" <kwolf@redhat.com>, "Max Reitz" <mreitz@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Michael Clark" <mjc@sifive.com>,
	"Palmer Dabbelt" <palmer@sifive.com>,
	"Jiri Slaby" <jslaby@suse.cz>, "Alexander Graf" <agraf@suse.de>,
	"Richard Henderson" <rth@twiddle.net>,
	"Michael Walle" <michael@walle.cc>,
	"Jan Kiszka" <jan.kiszka@web.de>
Subject: Re: [Qemu-devel] [PATCH v4 00/40] Use the IEC binary prefix definitions
Date: Mon, 11 Jun 2018 19:27:57 +0300	[thread overview]
Message-ID: <20180611192510-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <54eb6ae9-d7e0-8a4d-6bd4-f8f1d0f00b92@redhat.com>

On Mon, Jun 11, 2018 at 10:55:17AM -0500, Eric Blake wrote:
> On 06/10/2018 08:14 PM, Philippe Mathieu-Daudé wrote:
> > Hi,
> > 
> > This series:
> > 
> > - split the byte-based definitions from "qemu/cutils.h" to "qemu/units.h"
> >    (this now triggers WARNING: 1 added file, does MAINTAINERS need updating?)
> > - clean hw/ includes;
> > - replace different constants used for byte size with their corresponding
> >    IEC binary prefix definitions.
> > 
> > Since v3:
> > - use IEC binary prefix definitions (Stefan Weil)
> > - rebased
> > - added R-b tags
> > 
> 
> >   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
> > 
> 
> 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:
> 
> $ git grep -n '[<>][<>]= [1-5]0'
> disas/m68k.c:787:      val >>= 10;
> hw/mips/mips_malta.c:194:    ram_size >>= 20;
> hw/ppc/sam460ex.c:129:    ram_size >>= 20;
> hw/timer/sh_timer.c:112:        case 4: freq >>= 10; break;

Most likely not 4 kilobyte.


> linux-user/mips/cpu_loop.c:641:                                code >>= 10;
> linux-user/mips/cpu_loop.c:664:                        code >>= 10;

Seems to do with decoding machine code. Also unlikely to be in bytes.

> monitor.c:3198:                    val <<= 20;
> target/m68k/helper.c:386:    size >>= 10;
> target/m68k/helper.c:390:        size >>= 10;
> target/m68k/helper.c:394:            size >>= 10;
> target/xtensa/helper.c:729:            sz >>= 20;
> target/xtensa/helper.c:732:            sz >>= 10;
> vl.c:2793:            sz <<= 20;




> -- 
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.           +1-919-301-3266
> Virtualization:  qemu.org | libvirt.org

  parent reply	other threads:[~2018-06-11 16:28 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-11  1:14 [Qemu-devel] [PATCH v4 00/40] Use the IEC binary prefix definitions Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 01/40] include: Add IEC binary prefixes in "qemu/units.h" Philippe Mathieu-Daudé
2018-06-12 20:42   ` Richard Henderson
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 02/40] vdi: Use definitions from "qemu/units.h" Philippe Mathieu-Daudé
2018-06-11 19:27   ` Stefan Weil
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 03/40] x86/cpu: " Philippe Mathieu-Daudé
2018-06-11 18:42   ` Eduardo Habkost
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 04/40] checkpatch: Recognize IEC binary prefix definitions Philippe Mathieu-Daudé
2018-06-13 19:54   ` Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 05/40] hw: Use IEC binary prefix definitions from "qemu/units.h" Philippe Mathieu-Daudé
2018-06-11  2:11   ` David Gibson
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 06/40] hw: Directly use "qemu/units.h" instead of "qemu/cutils.h" Philippe Mathieu-Daudé
2018-06-11  2:16   ` David Gibson
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 07/40] hw/ivshmem: Use the IEC binary prefix definitions Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 08/40] hw/ipack: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 09/40] hw/scsi: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 10/40] hw/smbios: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 11/40] hw/xen: " Philippe Mathieu-Daudé
2018-06-12 20:51   ` Richard Henderson
2018-06-12 21:04     ` Eric Blake
2018-06-12 21:10       ` Richard Henderson
2018-06-13 12:13         ` Eric Blake
2018-06-13 19:31           ` Richard Henderson
2018-06-13 20:02             ` Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 12/40] hw/tpm: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 13/40] hw/block: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 14/40] hw/display: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 15/40] hw/misc: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 16/40] hw/riscv: " Philippe Mathieu-Daudé
2018-06-11  1:22   ` Michael Clark
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 17/40] hw/m68k: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 18/40] hw/sparc: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 19/40] hw/s390x: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 20/40] hw/hppa: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 21/40] hw/xtensa: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 22/40] hw/alpha: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 23/40] hw/tricore: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 24/40] hw/microblaze: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 25/40] hw/nios2: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 26/40] hw/cris: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 27/40] hw/lm32: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 28/40] hw/sh4: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 29/40] hw/mips/r4k: Constify params_size Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 30/40] hw/mips: Use the IEC binary prefix definitions Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 32/40] hw/ppc: " Philippe Mathieu-Daudé
2018-06-11  8:09   ` [Qemu-devel] [Qemu-ppc] " BALATON Zoltan
2018-06-11 15:44     ` Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 34/40] hw/net: " Philippe Mathieu-Daudé
2018-06-11 19:20   ` Stefan Weil
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 35/40] hw/usb: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 36/40] hw/sd: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 37/40] hw/vfio: " Philippe Mathieu-Daudé
2018-06-11  1:14 ` [Qemu-devel] [PATCH v4 38/40] hw/virtio: " Philippe Mathieu-Daudé
2018-06-11  1:15 ` [Qemu-devel] [PATCH v4 39/40] hw/rdma: " Philippe Mathieu-Daudé
2018-06-11  1:15 ` [Qemu-devel] [PATCH v4 40/40] cutils: Do not include "qemu/units.h" directly Philippe Mathieu-Daudé
     [not found] ` <20180611011501.10235-34-f4bug@amsat.org>
2018-06-11  2:18   ` [Qemu-devel] [PATCH v4 33/40] hw/i386: Use the IEC binary prefix definitions Michael S. Tsirkin
2018-06-11  2:29     ` Philippe Mathieu-Daudé
2018-06-11  2:22 ` [Qemu-devel] [PATCH v4 00/40] " Michael S. Tsirkin
2018-06-11  2:32   ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-06-11 15:55 ` [Qemu-devel] " Eric Blake
2018-06-11 16:11   ` Peter Maydell
2018-06-11 16:27   ` Michael S. Tsirkin [this message]
2018-06-11 16:18 ` Cornelia Huck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180611192510-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=agraf@suse.de \
    --cc=alex.williamson@redhat.com \
    --cc=alistair@alistair23.me \
    --cc=anthony.perard@citrix.com \
    --cc=antonynpavlov@gmail.com \
    --cc=armbru@redhat.com \
    --cc=atar4qemu@gmail.com \
    --cc=aurelien@aurel32.net \
    --cc=b.galvani@gmail.com \
    --cc=balrogg@gmail.com \
    --cc=berto@igalia.com \
    --cc=borntraeger@de.ibm.com \
    --cc=chouteau@adacore.com \
    --cc=cohuck@redhat.com \
    --cc=crosthwaite.peter@gmail.com \
    --cc=crwulff@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=david@redhat.com \
    --cc=dmitry.fleytman@gmail.com \
    --cc=eblake@redhat.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=famz@redhat.com \
    --cc=hpoussin@reactos.org \
    --cc=i.mitsyanko@gmail.com \
    --cc=imammedo@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=jasowang@redhat.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=jslaby@suse.cz \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=keith.busch@intel.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=magnus.damm@gmail.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=marex@denx.de \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=michael@walle.cc \
    --cc=mjc@sifive.com \
    --cc=mreitz@redhat.com \
    --cc=nikunj@linux.vnet.ibm.com \
    --cc=palmer@sifive.com \
    --cc=paul.burton@mips.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.chubb@nicta.com.au \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=sagark@eecs.berkeley.edu \
    --cc=sstabellini@kernel.org \
    --cc=stefanb@linux.vnet.ibm.com \
    --cc=sundeep.lkml@gmail.com \
    --cc=sw@weilnetz.de \
    --cc=thuth@redhat.com \
    --cc=yongbok.kim@mips.com \
    --cc=yuval.shaia@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).