qemu-arm
[Top][All Lists]
Advanced

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

Re: [Qemu-arm] [PATCH for-2.13 v2 3/5] pc: simplify MachineClass::get_ho


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-arm] [PATCH for-2.13 v2 3/5] pc: simplify MachineClass::get_hotplug_handler handling
Date: Wed, 18 Apr 2018 13:19:51 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 04/18/2018 11:56 AM, Eduardo Habkost wrote:
> On Wed, Apr 18, 2018 at 04:28:03PM +0200, Igor Mammedov wrote:
>> By default MachineClass::get_hotplug_handler is NULL and concrete board
>> should set it to it's own handler.
>> Considering there isn't any default handler, drop saving empty
>> MachineClass::get_hotplug_handler in child class and make PC code
>> consistent with spapr/s390x boards.
>>
>> We can bring this back when actual usecase surfaces and do it
>> consistently across boards that use get_hotplug_handler().
>>
>> Suggested-by: David Gibson <address@hidden>
>> Signed-off-by: Igor Mammedov <address@hidden>
> 
> Reviewed-by: Eduardo Habkost <address@hidden>
> 
> 
> [...]
>> @@ -2344,7 +2341,6 @@ static void pc_machine_class_init(ObjectClass *oc, 
>> void *data)
>>      HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc);
>>      NMIClass *nc = NMI_CLASS(oc);
>>  
>> -    pcmc->get_hotplug_handler = mc->get_hotplug_handler;
> 
> What about assert(!mc->get_hotplug_handler) just before
> overwriting it?

Good idea.

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>




reply via email to

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