Re: [Qemu-devel] [PATCH 22/22] core/sysbus: remove the SysBusDeviceClass::initpath

2018-11-24 Thread maozy
On 11/24/18 2:19 AM, Peter Maydell wrote: On Fri, 23 Nov 2018 at 18:16, Eduardo Habkost wrote: I think this is good enough for now (as long as there's a comment like Peter suggested). Allowing parent_realize to be NULL would be inconvenient to all code that uses parent_realize today. It w

Re: [Qemu-devel] [PATCH 22/22] core/sysbus: remove the SysBusDeviceClass::initpath

2018-11-23 Thread Eduardo Habkost
On Fri, Nov 23, 2018 at 11:10:40AM +0800, maozy wrote: > Hi, Eduardo > > On 11/20/18 7:31 AM, Eduardo Habkost wrote: > > On Mon, Nov 19, 2018 at 08:08:20PM +0800, Mao Zhongyi wrote: > > > Currently, all sysbus devices have been converted to realize(), > > > so remove this path. > > > > > > Cc: eh

Re: [Qemu-devel] [PATCH 22/22] core/sysbus: remove the SysBusDeviceClass::initpath

2018-11-23 Thread Peter Maydell
On Fri, 23 Nov 2018 at 18:16, Eduardo Habkost wrote: > I think this is good enough for now (as long as there's a comment > like Peter suggested). Allowing parent_realize to be NULL would > be inconvenient to all code that uses parent_realize today. > > Personally, I would love to get rid of paren

Re: [Qemu-devel] [PATCH 22/22] core/sysbus: remove the SysBusDeviceClass::initpath

2018-11-23 Thread maozy
On 11/23/18 5:02 PM, Peter Maydell wrote: On 23 November 2018 at 03:10, maozy wrote: In order to void the subclasses whose parent_realize field is set to NULL, the k->realize function must be retained even though it doesn't do anything practical. Just like this: -/* TODO remove once all sy

Re: [Qemu-devel] [PATCH 22/22] core/sysbus: remove the SysBusDeviceClass::initpath

2018-11-23 Thread Peter Maydell
On 23 November 2018 at 03:10, maozy wrote: > In order to void the subclasses whose parent_realize field is > set to NULL, the k->realize function must be retained even > though it doesn't do anything practical. Just like this: > > > -/* TODO remove once all sysbus devices have been converted to re

Re: [Qemu-devel] [PATCH 22/22] core/sysbus: remove the SysBusDeviceClass::initpath

2018-11-22 Thread maozy
Hi, Eduardo On 11/20/18 7:31 AM, Eduardo Habkost wrote: On Mon, Nov 19, 2018 at 08:08:20PM +0800, Mao Zhongyi wrote: Currently, all sysbus devices have been converted to realize(), so remove this path. Cc: ehabk...@redhat.com Cc: th...@redhat.com Cc: pbonz...@redhat.com Cc: arm...@redhat.com C