static void powerpc_set_compat(Object *obj, Visitor *v, const char *name,

                               void *opaque, Error **errp)

{

    Error *error = NULL;

    char *value = NULL;

    Property *prop = opaque;

    uint32_t *max_compat = qdev_get_prop_ptr(DEVICE(obj), prop);



    visit_type_str(v, name, &value, &error);

    if (error) {

        error_propagate(errp, error);

        return;

    }



    if (strcmp(value, "power6") == 0) {

        *max_compat = CPU_POWERPC_LOGICAL_2_05;

    } else if (strcmp(value, "power7") == 0) {

        *max_compat = CPU_POWERPC_LOGICAL_2_06;

    } else if (strcmp(value, "power8") == 0) {

        *max_compat = CPU_POWERPC_LOGICAL_2_07;

    } else {

        error_setg(errp, "Invalid compatibility mode \"%s\"", value);

    }



    g_free(value);

}

static void powerpc_set_compat(Object *obj, Visitor *v, const char *name,

                               void *opaque, Error **errp)

{

    Error *error = NULL;

    char *value = NULL;

    Property *prop = opaque;

    uint32_t *max_compat = qdev_get_prop_ptr(DEVICE(obj), prop);



    visit_type_str(v, name, &value, &error);

    if (error) {

        error_propagate(errp, error);

        return;

    }



    if (strcmp(value, "power6") == 0) {

        *max_compat = CPU_POWERPC_LOGICAL_2_05;

    } else if (strcmp(value, "power7") == 0) {

        *max_compat = CPU_POWERPC_LOGICAL_2_06;

    } else if (strcmp(value, "power8") == 0) {

        *max_compat = CPU_POWERPC_LOGICAL_2_07;

    } else {

        error_setg(errp, "Invalid compatibility mode \"%s\"", value);

    }



    g_free(value);

}

                               void *opaque, Error **errp)     Property *prop = opaque;     uint32_t *max_compat = qdev_get_prop_ptr(DEVICE(obj), prop); static void powerpc_set_compat(Object *obj, Visitor *v, const char *name,                                void *opaque, Error **errp)     Error *error = NULL;     char *value = NULL;     Property *prop = opaque;     uint32_t *max_compat = qdev_get_prop_ptr(DEVICE(obj), prop);     visit_type_str(v, name, &value, &error);     if (error) {         error_propagate(errp, error);     if (strcmp(value, "power6") == 0) {         *max_compat = CPU_POWERPC_LOGICAL_2_05;     } else if (strcmp(value, "power7") == 0) {         *max_compat = CPU_POWERPC_LOGICAL_2_06;     } else if (strcmp(value, "power8") == 0) {         *max_compat = CPU_POWERPC_LOGICAL_2_07;     } else {         error_setg(errp, "Invalid compatibility mode \"%s\"", value);     g_free(value);
static void FUNC_0(Object *VAR_0, Visitor *VAR_1, const char *VAR_2,

                               void *VAR_3, Error **VAR_4)

{

    Error *error = NULL;

    char *VAR_5 = NULL;

    Property *prop = VAR_3;

    uint32_t *max_compat = qdev_get_prop_ptr(DEVICE(VAR_0), prop);



    visit_type_str(VAR_1, VAR_2, &VAR_5, &error);

    if (error) {

        error_propagate(VAR_4, error);

        return;

    }



    if (strcmp(VAR_5, "power6") == 0) {

        *max_compat = CPU_POWERPC_LOGICAL_2_05;

    } else if (strcmp(VAR_5, "power7") == 0) {

        *max_compat = CPU_POWERPC_LOGICAL_2_06;

    } else if (strcmp(VAR_5, "power8") == 0) {

        *max_compat = CPU_POWERPC_LOGICAL_2_07;

    } else {

        error_setg(VAR_4, "Invalid compatibility mode \"%s\"", VAR_5);

    }



    g_free(VAR_5);

}

static void FUNC_0(Object *VAR_0, Visitor *VAR_1, const char *VAR_2,
void *VAR_3, Error **VAR_4)
{ Error *error = NULL; char *VAR_5 = NULL; Property *prop = VAR_3; uint32_t *max_compat = qdev_get_prop_ptr(DEVICE(VAR_0), prop); visit_type_str(VAR_1, VAR_2, &VAR_5, &error); if (error) { error_propagate(VAR_4, error); return; } if (strcmp(VAR_5, "power6") == 0) { *max_compat = CPU_POWERPC_LOGICAL_2_05; } else if (strcmp(VAR_5, "power7") == 0) { *max_compat = CPU_POWERPC_LOGICAL_2_06; } else if (strcmp(VAR_5, "power8") == 0) { *max_compat = CPU_POWERPC_LOGICAL_2_07; } else { error_setg(VAR_4, "Invalid compatibility mode \"%s\"", VAR_5); } g_free(VAR_5); }