Commit 895d5cd6 authored by David Gibson's avatar David Gibson
Browse files

spapr: Remove unnecessary 'options' field from sPAPRCapabilityInfo



The options field here is intended to list the available values for the
capability.  It's not used yet, because the existing capabilities are
boolean.

We're going to add capabilities that aren't, but in that case the info on
the possible values can be folded into the .description field.

Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
parent 4e5fe368
Loading
Loading
Loading
Loading
+1 −5
Original line number Original line Diff line number Diff line
@@ -35,7 +35,6 @@
typedef struct sPAPRCapabilityInfo {
typedef struct sPAPRCapabilityInfo {
    const char *name;
    const char *name;
    const char *description;
    const char *description;
    const char *options;                        /* valid capability values */
    int index;
    int index;


    /* Getter and Setter Function Pointers */
    /* Getter and Setter Function Pointers */
@@ -126,7 +125,6 @@ sPAPRCapabilityInfo capability_table[SPAPR_CAP_NUM] = {
    [SPAPR_CAP_HTM] = {
    [SPAPR_CAP_HTM] = {
        .name = "htm",
        .name = "htm",
        .description = "Allow Hardware Transactional Memory (HTM)",
        .description = "Allow Hardware Transactional Memory (HTM)",
        .options = "",
        .index = SPAPR_CAP_HTM,
        .index = SPAPR_CAP_HTM,
        .get = spapr_cap_get_bool,
        .get = spapr_cap_get_bool,
        .set = spapr_cap_set_bool,
        .set = spapr_cap_set_bool,
@@ -136,7 +134,6 @@ sPAPRCapabilityInfo capability_table[SPAPR_CAP_NUM] = {
    [SPAPR_CAP_VSX] = {
    [SPAPR_CAP_VSX] = {
        .name = "vsx",
        .name = "vsx",
        .description = "Allow Vector Scalar Extensions (VSX)",
        .description = "Allow Vector Scalar Extensions (VSX)",
        .options = "",
        .index = SPAPR_CAP_VSX,
        .index = SPAPR_CAP_VSX,
        .get = spapr_cap_get_bool,
        .get = spapr_cap_get_bool,
        .set = spapr_cap_set_bool,
        .set = spapr_cap_set_bool,
@@ -146,7 +143,6 @@ sPAPRCapabilityInfo capability_table[SPAPR_CAP_NUM] = {
    [SPAPR_CAP_DFP] = {
    [SPAPR_CAP_DFP] = {
        .name = "dfp",
        .name = "dfp",
        .description = "Allow Decimal Floating Point (DFP)",
        .description = "Allow Decimal Floating Point (DFP)",
        .options = "",
        .index = SPAPR_CAP_DFP,
        .index = SPAPR_CAP_DFP,
        .get = spapr_cap_get_bool,
        .get = spapr_cap_get_bool,
        .set = spapr_cap_set_bool,
        .set = spapr_cap_set_bool,
@@ -338,7 +334,7 @@ void spapr_caps_add_properties(sPAPRMachineClass *smc, Error **errp)
            return;
            return;
        }
        }


        desc = g_strdup_printf("%s%s", cap->description, cap->options);
        desc = g_strdup_printf("%s", cap->description);
        object_class_property_set_description(klass, name, desc, &local_err);
        object_class_property_set_description(klass, name, desc, &local_err);
        g_free(desc);
        g_free(desc);
        if (local_err) {
        if (local_err) {