qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [PATCH v4 00/40] Use the IEC binary prefix definitions


From: Michael S. Tsirkin
Subject: Re: [Qemu-arm] [PATCH v4 00/40] Use the IEC binary prefix definitions
Date: Mon, 11 Jun 2018 19:27:57 +0300

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]