static void spapr_machine_device_plug(HotplugHandler *hotplug_dev,

                                      DeviceState *dev, Error **errp)

{

    sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(qdev_get_machine());



    if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) {

        uint32_t node;



        if (!smc->dr_lmb_enabled) {

            error_setg(errp, "Memory hotplug not supported for this machine");

            return;

        }

        node = object_property_get_int(OBJECT(dev), PC_DIMM_NODE_PROP, errp);

        if (*errp) {

            return;

        }



        spapr_memory_plug(hotplug_dev, dev, node, errp);

    }

}

static void spapr_machine_device_plug(HotplugHandler *hotplug_dev,

                                      DeviceState *dev, Error **errp)

{

    sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(qdev_get_machine());



    if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) {

        uint32_t node;



        if (!smc->dr_lmb_enabled) {

            error_setg(errp, "Memory hotplug not supported for this machine");

            return;

        }

        node = object_property_get_int(OBJECT(dev), PC_DIMM_NODE_PROP, errp);

        if (*errp) {

            return;

        }



        spapr_memory_plug(hotplug_dev, dev, node, errp);

    }

}

        uint32_t node;
static void FUNC_0(HotplugHandler *VAR_0,

                                      DeviceState *VAR_1, Error **VAR_2)

{

    sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(qdev_get_machine());



    if (object_dynamic_cast(OBJECT(VAR_1), TYPE_PC_DIMM)) {

        uint32_t node;



        if (!smc->dr_lmb_enabled) {

            error_setg(VAR_2, "Memory hotplug not supported for this machine");

            return;

        }

        node = object_property_get_int(OBJECT(VAR_1), PC_DIMM_NODE_PROP, VAR_2);

        if (*VAR_2) {

            return;

        }



        spapr_memory_plug(VAR_0, VAR_1, node, VAR_2);

    }

}

static void FUNC_0(HotplugHandler *VAR_0,
DeviceState *VAR_1, Error **VAR_2)
{ sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(qdev_get_machine()); if (object_dynamic_cast(OBJECT(VAR_1), TYPE_PC_DIMM)) { uint32_t node; if (!smc->dr_lmb_enabled) { error_setg(VAR_2, "Memory hotplug not supported for this machine"); return; } node = object_property_get_int(OBJECT(VAR_1), PC_DIMM_NODE_PROP, VAR_2); if (*VAR_2) { return; } spapr_memory_plug(VAR_0, VAR_1, node, VAR_2); } }