qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCHv3 01/13] sparc32_dma: rename SPARC32_DMA type to


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCHv3 01/13] sparc32_dma: rename SPARC32_DMA type to SPARC32_DMA_DEVICE
Date: Fri, 27 Oct 2017 13:25:03 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 10/20/2017 09:39 AM, Mark Cave-Ayland wrote:
>>> Also update the function names to match as appropriate. While we're
>>> here rename the type from sparc32_dma to sparc32-dma in order to
>>> match the current QOM convention.
>>
>> Where can I read on the QOM convention?
> 
> The relevant documentation is in include/qom/object.h on line 937: "In
> general, you should use hyphens '-' instead of underscores '_' when
> naming properties.". Note that while the type name isn't strictly a
> property, I have been asked previously to change type names to use
> hyphens on submitted patches.

OK, thanks.

>>> -#define TYPE_SPARC32_DMA "sparc32_dma"
>>> -#define SPARC32_DMA(obj) OBJECT_CHECK(DMAState, (obj), TYPE_SPARC32_DMA)
>>> +#define TYPE_SPARC32_DMA_DEVICE "sparc32-dma-device"
>>> +#define SPARC32_DMA_DEVICE(obj) OBJECT_CHECK(DMADeviceState, (obj), \
>>
>> not sure this is an improvement.
> 
> Can you clarify this further? The patchset introduces a common
> SPARC32_DMA_DEVICE superclass which is intended to be the superclass for
> the le/esp devices. Later on in the patchset, the previous SPARC32_DMA
> object becomes a container effectively representing the memory region
> holding the DMA registers for these devices.

Fine :)

> 
>>> +                                             TYPE_SPARC32_DMA_DEVICE)
[...]
>>> -    dev = qdev_create(NULL, "sparc32_dma");
>>> +    dev = qdev_create(NULL, "sparc32-dma-device");
>>
>> Can you use TYPE_SPARC32_DMA_DEVICE instead here?
> 
> No not at this point (you'll see I change this later in the patchset)
> because the type is still currently defined in sparc32_dma.c and hasn't
> (yet) been moved to sparc32_dma.h.

OK!



reply via email to

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