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!