[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 21/30] hw/misc: use the BYTE-based definition
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH v2 21/30] hw/misc: use the BYTE-based definitions |
Date: |
Mon, 5 Mar 2018 16:05:48 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
Hi Jiri,
On 03/05/2018 04:02 PM, Jiri Slaby wrote:
> On 03/05/2018, 12:27 PM, Philippe Mathieu-Daudé wrote:
>> --- a/hw/misc/auxbus.c
>> +++ b/hw/misc/auxbus.c
>> @@ -68,7 +68,7 @@ AUXBus *aux_init_bus(DeviceState *parent, const char *name)
>>
>> /* Memory related. */
>> bus->aux_io = 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", 2 * M_BYTE);
>
> Only M_BYTE, not "2 *".
Yes! I totally missed this :/
>
>> 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..ce8235dfc4 100644
>> --- a/hw/misc/edu.c
>> +++ b/hw/misc/edu.c
>> @@ -357,7 +357,7 @@ static void pci_edu_realize(PCIDevice *pdev, Error
>> **errp)
>> edu, QEMU_THREAD_JOINABLE);
>>
>> memory_region_init_io(&edu->mmio, OBJECT(edu), &edu_mmio_ops, edu,
>> - "edu-mmio", 1 << 20);
>> + "edu-mmio", 1 * M_BYTE);
>
> "1 * " is superfluous
I kept "1 * " to be consistent with the other uses, I find it easier to
review (or modify).
Thanks for your review!
Phil.
- [Qemu-devel] [PATCH v2 16/30] hw/sh4: use the BYTE-based definitions, (continued)
- [Qemu-devel] [PATCH v2 16/30] hw/sh4: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 10/30] hw/ppc: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 15/30] hw/lm32: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 17/30] hw/tricore: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 12/30] hw/hppa: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 19/30] hw/nios2: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 18/30] hw/microblaze: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 20/30] hw/cris: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 21/30] hw/misc: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 25/30] hw/scsi: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 24/30] hw/ipack: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 26/30] hw/smbios: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 23/30] hw/net: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 29/30] tpm: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 27/30] vfio/pci: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 30/30] xen: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 28/30] ivshmem: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05