qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [PATCH v2 21/30] hw/misc: use the BYTE-based definiti


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-trivial] [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.



reply via email to

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