diff mbox series

[30/36] qdev: Rename qdev_prop_* to prop_info_*

Message ID 20201029220246.472693-31-ehabkost@redhat.com
State Superseded
Headers show
Series Make qdev static property API usable by any QOM type | expand

Commit Message

Eduardo Habkost Oct. 29, 2020, 10:02 p.m. UTC
The basic property types in qdev-properties.c are not going to be
qdev-specific anymore.  Rename the variables to prop_info_*.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Dmitry Fleytman <dmitry.fleytman@gmail.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: Artyom Tarasenko <atar4qemu@gmail.com>
Cc: qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org
---
 include/hw/qdev-properties.h | 68 ++++++++++++++++++------------------
 hw/core/qdev-properties.c    | 38 ++++++++++----------
 hw/intc/arm_gicv3_common.c   |  2 +-
 hw/intc/rx_icu.c             |  4 +--
 hw/misc/arm_sysctl.c         |  4 +--
 hw/net/e1000e.c              |  6 ++--
 target/arm/cpu.c             |  2 +-
 target/sparc/cpu.c           |  2 +-
 8 files changed, 63 insertions(+), 63 deletions(-)

Comments

Marc-André Lureau Oct. 30, 2020, 5:02 p.m. UTC | #1
On Fri, Oct 30, 2020 at 2:19 AM Eduardo Habkost <ehabkost@redhat.com> wrote:

> The basic property types in qdev-properties.c are not going to be

> qdev-specific anymore.  Rename the variables to prop_info_*.

>

> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

>


Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>



> ---

> Cc: Paolo Bonzini <pbonzini@redhat.com>

> Cc: "Daniel P. Berrangé" <berrange@redhat.com>

> Cc: Eduardo Habkost <ehabkost@redhat.com>

> Cc: Peter Maydell <peter.maydell@linaro.org>

> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>

> Cc: Dmitry Fleytman <dmitry.fleytman@gmail.com>

> Cc: Jason Wang <jasowang@redhat.com>

> Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

> Cc: Artyom Tarasenko <atar4qemu@gmail.com>

> Cc: qemu-devel@nongnu.org

> Cc: qemu-arm@nongnu.org

> ---

>  include/hw/qdev-properties.h | 68 ++++++++++++++++++------------------

>  hw/core/qdev-properties.c    | 38 ++++++++++----------

>  hw/intc/arm_gicv3_common.c   |  2 +-

>  hw/intc/rx_icu.c             |  4 +--

>  hw/misc/arm_sysctl.c         |  4 +--

>  hw/net/e1000e.c              |  6 ++--

>  target/arm/cpu.c             |  2 +-

>  target/sparc/cpu.c           |  2 +-

>  8 files changed, 63 insertions(+), 63 deletions(-)

>

> diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h

> index 2b00a1bcf6..7a08946448 100644

> --- a/include/hw/qdev-properties.h

> +++ b/include/hw/qdev-properties.h

> @@ -6,23 +6,23 @@

>

>  /*** qdev-properties.c ***/

>

> -extern const PropertyInfo qdev_prop_bit;

> -extern const PropertyInfo qdev_prop_bit64;

> -extern const PropertyInfo qdev_prop_bool;

> -extern const PropertyInfo qdev_prop_enum;

> -extern const PropertyInfo qdev_prop_uint8;

> -extern const PropertyInfo qdev_prop_uint16;

> -extern const PropertyInfo qdev_prop_uint32;

> -extern const PropertyInfo qdev_prop_int32;

> -extern const PropertyInfo qdev_prop_uint64;

> -extern const PropertyInfo qdev_prop_int64;

> -extern const PropertyInfo qdev_prop_size;

> -extern const PropertyInfo qdev_prop_string;

> -extern const PropertyInfo qdev_prop_on_off_auto;

> -extern const PropertyInfo qdev_prop_size32;

> -extern const PropertyInfo qdev_prop_uuid;

> -extern const PropertyInfo qdev_prop_arraylen;

> -extern const PropertyInfo qdev_prop_link;

> +extern const PropertyInfo prop_info_bit;

> +extern const PropertyInfo prop_info_bit64;

> +extern const PropertyInfo prop_info_bool;

> +extern const PropertyInfo prop_info_enum;

> +extern const PropertyInfo prop_info_uint8;

> +extern const PropertyInfo prop_info_uint16;

> +extern const PropertyInfo prop_info_uint32;

> +extern const PropertyInfo prop_info_int32;

> +extern const PropertyInfo prop_info_uint64;

> +extern const PropertyInfo prop_info_int64;

> +extern const PropertyInfo prop_info_size;

> +extern const PropertyInfo prop_info_string;

> +extern const PropertyInfo prop_info_on_off_auto;

> +extern const PropertyInfo prop_info_size32;

> +extern const PropertyInfo prop_info_uuid;

> +extern const PropertyInfo prop_info_arraylen;

> +extern const PropertyInfo prop_info_link;

>

>  #define DEFINE_PROP(_name, _state, _field, _prop, _type, ...) {  \

>          .name      = (_name),                                    \

> @@ -41,7 +41,7 @@ extern const PropertyInfo qdev_prop_link;

>      DEFINE_PROP(_name, _state, _field, _prop, _type)

>

>  #define DEFINE_PROP_BIT(_name, _state, _field, _bit, _defval)   \

> -    DEFINE_PROP(_name, _state, _field, qdev_prop_bit, uint32_t, \

> +    DEFINE_PROP(_name, _state, _field, prop_info_bit, uint32_t, \

>                  .bitnr       = (_bit),                          \

>                  .set_default = true,                            \

>                  .defval.u    = (bool)_defval)

> @@ -55,13 +55,13 @@ extern const PropertyInfo qdev_prop_link;

>      DEFINE_PROP(_name, _state, _field, _prop, _type)

>

>  #define DEFINE_PROP_BIT64(_name, _state, _field, _bit, _defval)   \

> -    DEFINE_PROP(_name, _state, _field, qdev_prop_bit64, uint64_t, \

> +    DEFINE_PROP(_name, _state, _field, prop_info_bit64, uint64_t, \

>                  .bitnr    = (_bit),                               \

>                  .set_default = true,                              \

>                  .defval.u  = (bool)_defval)

>

>  #define DEFINE_PROP_BOOL(_name, _state, _field, _defval)     \

> -    DEFINE_PROP(_name, _state, _field, qdev_prop_bool, bool, \

> +    DEFINE_PROP(_name, _state, _field, prop_info_bool, bool, \

>                  .set_default = true,                         \

>                  .defval.u    = (bool)_defval)

>

> @@ -94,7 +94,7 @@ extern const PropertyInfo qdev_prop_link;

>  #define DEFINE_PROP_ARRAY(_name, _state, _field,               \

>                            _arrayfield, _arrayprop, _arraytype) \

>      DEFINE_PROP((PROP_ARRAY_LEN_PREFIX _name),                 \

> -                _state, _field, qdev_prop_arraylen, uint32_t,  \

> +                _state, _field, prop_info_arraylen, uint32_t,  \

>                  .set_default = true,                           \

>                  .defval.u = 0,                                 \

>                  .arrayinfo = &(_arrayprop),                    \

> @@ -102,34 +102,34 @@ extern const PropertyInfo qdev_prop_link;

>                  .arrayoffset = offsetof(_state, _arrayfield))

>

>  #define DEFINE_PROP_LINK(_name, _state, _field, _type, _ptr_type)     \

> -    DEFINE_PROP(_name, _state, _field, qdev_prop_link, _ptr_type,     \

> +    DEFINE_PROP(_name, _state, _field, prop_info_link, _ptr_type,     \

>                  .link_type  = _type)

>

>  #define DEFINE_PROP_UINT8(_n, _s, _f, _d)                       \

> -    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_uint8, uint8_t)

> +    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, prop_info_uint8, uint8_t)

>  #define DEFINE_PROP_UINT16(_n, _s, _f, _d)                      \

> -    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_uint16, uint16_t)

> +    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, prop_info_uint16, uint16_t)

>  #define DEFINE_PROP_UINT32(_n, _s, _f, _d)                      \

> -    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_uint32, uint32_t)

> +    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, prop_info_uint32, uint32_t)

>  #define DEFINE_PROP_INT32(_n, _s, _f, _d)                      \

> -    DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_int32, int32_t)

> +    DEFINE_PROP_SIGNED(_n, _s, _f, _d, prop_info_int32, int32_t)

>  #define DEFINE_PROP_UINT64(_n, _s, _f, _d)                      \

> -    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_uint64, uint64_t)

> +    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, prop_info_uint64, uint64_t)

>  #define DEFINE_PROP_INT64(_n, _s, _f, _d)                      \

> -    DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_int64, int64_t)

> +    DEFINE_PROP_SIGNED(_n, _s, _f, _d, prop_info_int64, int64_t)

>  #define DEFINE_PROP_SIZE(_n, _s, _f, _d)                       \

> -    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_size, uint64_t)

> +    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, prop_info_size, uint64_t)

>  #define DEFINE_PROP_STRING(_n, _s, _f)             \

> -    DEFINE_PROP(_n, _s, _f, qdev_prop_string, char*)

> +    DEFINE_PROP(_n, _s, _f, prop_info_string, char*)

>  #define DEFINE_PROP_ON_OFF_AUTO(_n, _s, _f, _d) \

> -    DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_on_off_auto, OnOffAuto)

> +    DEFINE_PROP_SIGNED(_n, _s, _f, _d, prop_info_on_off_auto, OnOffAuto)

>  #define DEFINE_PROP_SIZE32(_n, _s, _f, _d)                       \

> -    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_size32, uint32_t)

> +    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, prop_info_size32, uint32_t)

>  #define DEFINE_PROP_UUID(_name, _state, _field)                      \

> -    DEFINE_PROP(_name, _state, _field, qdev_prop_uuid, QemuUUID,     \

> +    DEFINE_PROP(_name, _state, _field, prop_info_uuid, QemuUUID,     \

>                  .set_default = true)

>  #define DEFINE_PROP_UUID_NODEFAULT(_name, _state, _field) \

> -    DEFINE_PROP(_name, _state, _field, qdev_prop_uuid, QemuUUID)

> +    DEFINE_PROP(_name, _state, _field, prop_info_uuid, QemuUUID)

>

>  #define DEFINE_PROP_END_OF_LIST()               \

>      {}

> diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c

> index 1b27ba7236..59d65a7362 100644

> --- a/hw/core/qdev-properties.c

> +++ b/hw/core/qdev-properties.c

> @@ -76,7 +76,7 @@ void

> object_propinfo_set_default_value_enum(ObjectProperty *op,

>          qapi_enum_lookup(prop->info->enum_table, prop->defval.i));

>  }

>

> -const PropertyInfo qdev_prop_enum = {

> +const PropertyInfo prop_info_enum = {

>      .name  = "enum",

>      .get   = object_propinfo_get_enum,

>      .set   = object_propinfo_set_enum,

> @@ -87,7 +87,7 @@ const PropertyInfo qdev_prop_enum = {

>

>  static uint32_t qdev_get_prop_mask(Property *prop)

>  {

> -    assert(prop->info == &qdev_prop_bit);

> +    assert(prop->info == &prop_info_bit);

>      return 0x1 << prop->bitnr;

>  }

>

> @@ -129,7 +129,7 @@ static void set_default_value_bool(ObjectProperty *op,

> const Property *prop)

>      object_property_set_default_bool(op, prop->defval.u);

>  }

>

> -const PropertyInfo qdev_prop_bit = {

> +const PropertyInfo prop_info_bit = {

>      .name  = "bool",

>      .description = "on/off",

>      .get   = prop_get_bit,

> @@ -141,7 +141,7 @@ const PropertyInfo qdev_prop_bit = {

>

>  static uint64_t qdev_get_prop_mask64(Property *prop)

>  {

> -    assert(prop->info == &qdev_prop_bit64);

> +    assert(prop->info == &prop_info_bit64);

>      return 0x1ull << prop->bitnr;

>  }

>

> @@ -178,7 +178,7 @@ static void prop_set_bit64(Object *obj, Visitor *v,

> const char *name,

>      bit64_prop_set(obj, prop, value);

>  }

>

> -const PropertyInfo qdev_prop_bit64 = {

> +const PropertyInfo prop_info_bit64 = {

>      .name  = "bool",

>      .description = "on/off",

>      .get   = prop_get_bit64,

> @@ -206,7 +206,7 @@ static void set_bool(Object *obj, Visitor *v, const

> char *name, void *opaque,

>      visit_type_bool(v, name, ptr, errp);

>  }

>

> -const PropertyInfo qdev_prop_bool = {

> +const PropertyInfo prop_info_bool = {

>      .name  = "bool",

>      .get   = get_bool,

>      .set   = set_bool,

> @@ -245,7 +245,7 @@ void

> object_propinfo_set_default_value_uint(ObjectProperty *op,

>      object_property_set_default_uint(op, prop->defval.u);

>  }

>

> -const PropertyInfo qdev_prop_uint8 = {

> +const PropertyInfo prop_info_uint8 = {

>      .name  = "uint8",

>      .get   = get_uint8,

>      .set   = set_uint8,

> @@ -272,7 +272,7 @@ static void set_uint16(Object *obj, Visitor *v, const

> char *name,

>      visit_type_uint16(v, name, ptr, errp);

>  }

>

> -const PropertyInfo qdev_prop_uint16 = {

> +const PropertyInfo prop_info_uint16 = {

>      .name  = "uint16",

>      .get   = get_uint16,

>      .set   = set_uint16,

> @@ -317,14 +317,14 @@ static void set_int32(Object *obj, Visitor *v, const

> char *name, void *opaque,

>      visit_type_int32(v, name, ptr, errp);

>  }

>

> -const PropertyInfo qdev_prop_uint32 = {

> +const PropertyInfo prop_info_uint32 = {

>      .name  = "uint32",

>      .get   = get_uint32,

>      .set   = set_uint32,

>      .set_default_value = object_propinfo_set_default_value_uint,

>  };

>

> -const PropertyInfo qdev_prop_int32 = {

> +const PropertyInfo prop_info_int32 = {

>      .name  = "int32",

>      .get   = object_propinfo_get_int32,

>      .set   = set_int32,

> @@ -369,14 +369,14 @@ static void set_int64(Object *obj, Visitor *v, const

> char *name,

>      visit_type_int64(v, name, ptr, errp);

>  }

>

> -const PropertyInfo qdev_prop_uint64 = {

> +const PropertyInfo prop_info_uint64 = {

>      .name  = "uint64",

>      .get   = get_uint64,

>      .set   = set_uint64,

>      .set_default_value = object_propinfo_set_default_value_uint,

>  };

>

> -const PropertyInfo qdev_prop_int64 = {

> +const PropertyInfo prop_info_int64 = {

>      .name  = "int64",

>      .get   = get_int64,

>      .set   = set_int64,

> @@ -419,7 +419,7 @@ static void set_string(Object *obj, Visitor *v, const

> char *name,

>      *ptr = str;

>  }

>

> -const PropertyInfo qdev_prop_string = {

> +const PropertyInfo prop_info_string = {

>      .name  = "str",

>      .release = release_string,

>      .get   = get_string,

> @@ -428,7 +428,7 @@ const PropertyInfo qdev_prop_string = {

>

>  /* --- on/off/auto --- */

>

> -const PropertyInfo qdev_prop_on_off_auto = {

> +const PropertyInfo prop_info_on_off_auto = {

>      .name = "OnOffAuto",

>      .description = "on/off/auto",

>      .enum_table = &OnOffAuto_lookup,

> @@ -471,7 +471,7 @@ static void set_size32(Object *obj, Visitor *v, const

> char *name, void *opaque,

>      *ptr = value;

>  }

>

> -const PropertyInfo qdev_prop_size32 = {

> +const PropertyInfo prop_info_size32 = {

>      .name  = "size",

>      .get = object_propinfo_get_size32,

>      .set = set_size32,

> @@ -519,7 +519,7 @@ static void set_default_uuid_auto(ObjectProperty *op,

> const Property *prop)

>      object_property_set_default_str(op, UUID_VALUE_AUTO);

>  }

>

> -const PropertyInfo qdev_prop_uuid = {

> +const PropertyInfo prop_info_uuid = {

>      .name  = "str",

>      .description = "UUID (aka GUID) or \"" UUID_VALUE_AUTO

>          "\" for random value (default)",

> @@ -640,7 +640,7 @@ static void set_prop_arraylen(Object *obj, Visitor *v,

> const char *name,

>      }

>  }

>

> -const PropertyInfo qdev_prop_arraylen = {

> +const PropertyInfo prop_info_arraylen = {

>      .name = "uint32",

>      .get = get_uint32,

>      .set = set_prop_arraylen,

> @@ -839,7 +839,7 @@ static void set_size(Object *obj, Visitor *v, const

> char *name, void *opaque,

>      visit_type_size(v, name, ptr, errp);

>  }

>

> -const PropertyInfo qdev_prop_size = {

> +const PropertyInfo prop_info_size = {

>      .name  = "size",

>      .get = get_size,

>      .set = set_size,

> @@ -860,7 +860,7 @@ static ObjectProperty

> *create_link_property(ObjectClass *oc, Property *prop)

>                                            OBJ_PROP_LINK_STRONG);

>  }

>

> -const PropertyInfo qdev_prop_link = {

> +const PropertyInfo prop_info_link = {

>      .name = "link",

>      .create = create_link_property,

>  };

> diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c

> index 58ef65f589..6d06b4d4c5 100644

> --- a/hw/intc/arm_gicv3_common.c

> +++ b/hw/intc/arm_gicv3_common.c

> @@ -496,7 +496,7 @@ static Property arm_gicv3_common_properties[] = {

>      DEFINE_PROP_UINT32("revision", GICv3State, revision, 3),

>      DEFINE_PROP_BOOL("has-security-extensions", GICv3State,

> security_extn, 0),

>      DEFINE_PROP_ARRAY("redist-region-count", GICv3State,

> nb_redist_regions,

> -                      redist_region_count, qdev_prop_uint32, uint32_t),

> +                      redist_region_count, prop_info_uint32, uint32_t),

>      DEFINE_PROP_END_OF_LIST(),

>  };

>

> diff --git a/hw/intc/rx_icu.c b/hw/intc/rx_icu.c

> index 94e17a9dea..823160d9a8 100644

> --- a/hw/intc/rx_icu.c

> +++ b/hw/intc/rx_icu.c

> @@ -365,9 +365,9 @@ static const VMStateDescription vmstate_rxicu = {

>

>  static Property rxicu_properties[] = {

>      DEFINE_PROP_ARRAY("ipr-map", RXICUState, nr_irqs, map,

> -                      qdev_prop_uint8, uint8_t),

> +                      prop_info_uint8, uint8_t),

>      DEFINE_PROP_ARRAY("trigger-level", RXICUState, nr_sense, init_sense,

> -                      qdev_prop_uint8, uint8_t),

> +                      prop_info_uint8, uint8_t),

>      DEFINE_PROP_END_OF_LIST(),

>  };

>

> diff --git a/hw/misc/arm_sysctl.c b/hw/misc/arm_sysctl.c

> index 42d4693854..634f3d916f 100644

> --- a/hw/misc/arm_sysctl.c

> +++ b/hw/misc/arm_sysctl.c

> @@ -628,10 +628,10 @@ static Property arm_sysctl_properties[] = {

>      DEFINE_PROP_UINT32("proc_id", arm_sysctl_state, proc_id, 0),

>      /* Daughterboard power supply voltages (as reported via SYS_CFG) */

>      DEFINE_PROP_ARRAY("db-voltage", arm_sysctl_state, db_num_vsensors,

> -                      db_voltage, qdev_prop_uint32, uint32_t),

> +                      db_voltage, prop_info_uint32, uint32_t),

>      /* Daughterboard clock reset values (as reported via SYS_CFG) */

>      DEFINE_PROP_ARRAY("db-clock", arm_sysctl_state, db_num_clocks,

> -                      db_clock_reset, qdev_prop_uint32, uint32_t),

> +                      db_clock_reset, prop_info_uint32, uint32_t),

>      DEFINE_PROP_END_OF_LIST(),

>  };

>

> diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c

> index b6f1ae3c8f..7928939ae2 100644

> --- a/hw/net/e1000e.c

> +++ b/hw/net/e1000e.c

> @@ -686,15 +686,15 @@ static void e1000e_class_init(ObjectClass *class,

> void *data)

>      dc->reset = e1000e_qdev_reset;

>      dc->vmsd = &e1000e_vmstate;

>

> -    e1000e_prop_disable_vnet = qdev_prop_uint8;

> +    e1000e_prop_disable_vnet = prop_info_uint8;

>      e1000e_prop_disable_vnet.description = "Do not use virtio headers, "

>                                             "perform SW offloads emulation

> "

>                                             "instead";

>

> -    e1000e_prop_subsys_ven = qdev_prop_uint16;

> +    e1000e_prop_subsys_ven = prop_info_uint16;

>      e1000e_prop_subsys_ven.description = "PCI device Subsystem Vendor ID";

>

> -    e1000e_prop_subsys = qdev_prop_uint16;

> +    e1000e_prop_subsys = prop_info_uint16;

>      e1000e_prop_subsys.description = "PCI device Subsystem ID";

>

>      device_class_set_props(dc, e1000e_properties);

> diff --git a/target/arm/cpu.c b/target/arm/cpu.c

> index 07492e9f9a..cef92879b0 100644

> --- a/target/arm/cpu.c

> +++ b/target/arm/cpu.c

> @@ -1108,7 +1108,7 @@ static Property arm_cpu_has_mpu_property =

>  static Property arm_cpu_pmsav7_dregion_property =

>              DEFINE_PROP_UNSIGNED_NODEFAULT("pmsav7-dregion", ARMCPU,

>                                             pmsav7_dregion,

> -                                           qdev_prop_uint32, uint32_t);

> +                                           prop_info_uint32, uint32_t);

>

>  static bool arm_get_pmu(Object *obj, Error **errp)

>  {

> diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c

> index cf21efd85f..a03ec9b0e8 100644

> --- a/target/sparc/cpu.c

> +++ b/target/sparc/cpu.c

> @@ -839,7 +839,7 @@ static Property sparc_cpu_properties[] = {

>      DEFINE_PROP_BIT("cmt",      SPARCCPU, env.def.features, 12, false),

>      DEFINE_PROP_BIT("gl",       SPARCCPU, env.def.features, 13, false),

>      DEFINE_PROP_UNSIGNED("iu-version", SPARCCPU, env.def.iu_version, 0,

> -                         qdev_prop_uint64, target_ulong),

> +                         prop_info_uint64, target_ulong),

>      DEFINE_PROP_UINT32("fpu-version", SPARCCPU, env.def.fpu_version, 0),

>      DEFINE_PROP_UINT32("mmu-version", SPARCCPU, env.def.mmu_version, 0),

>      { .name  = "nwindows", .info  = &qdev_prop_nwindows },

> --

> 2.28.0

>

>

>


-- 
Marc-André Lureau
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 30, 2020 at 2:19 AM Eduardo Habkost &lt;<a href="mailto:ehabkost@redhat.com">ehabkost@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The basic property types in qdev-properties.c are not going to be<br>
qdev-specific anymore.  Rename the variables to prop_info_*.<br>
<br>
Signed-off-by: Eduardo Habkost &lt;<a href="mailto:ehabkost@redhat.com" target="_blank">ehabkost@redhat.com</a>&gt;<br></blockquote><div><br></div><div><div>Reviewed-by: Marc-André Lureau &lt;<a href="mailto:marcandre.lureau@redhat.com" target="_blank">marcandre.lureau@redhat.com</a>&gt;</div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

---<br>
Cc: Paolo Bonzini &lt;<a href="mailto:pbonzini@redhat.com" target="_blank">pbonzini@redhat.com</a>&gt;<br>
Cc: &quot;Daniel P. Berrangé&quot; &lt;<a href="mailto:berrange@redhat.com" target="_blank">berrange@redhat.com</a>&gt;<br>
Cc: Eduardo Habkost &lt;<a href="mailto:ehabkost@redhat.com" target="_blank">ehabkost@redhat.com</a>&gt;<br>
Cc: Peter Maydell &lt;<a href="mailto:peter.maydell@linaro.org" target="_blank">peter.maydell@linaro.org</a>&gt;<br>
Cc: Yoshinori Sato &lt;<a href="mailto:ysato@users.sourceforge.jp" target="_blank">ysato@users.sourceforge.jp</a>&gt;<br>
Cc: Dmitry Fleytman &lt;<a href="mailto:dmitry.fleytman@gmail.com" target="_blank">dmitry.fleytman@gmail.com</a>&gt;<br>
Cc: Jason Wang &lt;<a href="mailto:jasowang@redhat.com" target="_blank">jasowang@redhat.com</a>&gt;<br>
Cc: Mark Cave-Ayland &lt;<a href="mailto:mark.cave-ayland@ilande.co.uk" target="_blank">mark.cave-ayland@ilande.co.uk</a>&gt;<br>
Cc: Artyom Tarasenko &lt;<a href="mailto:atar4qemu@gmail.com" target="_blank">atar4qemu@gmail.com</a>&gt;<br>
Cc: <a href="mailto:qemu-devel@nongnu.org" target="_blank">qemu-devel@nongnu.org</a><br>
Cc: <a href="mailto:qemu-arm@nongnu.org" target="_blank">qemu-arm@nongnu.org</a><br>
---<br>
 include/hw/qdev-properties.h | 68 ++++++++++++++++++------------------<br>
 hw/core/qdev-properties.c    | 38 ++++++++++----------<br>
 hw/intc/arm_gicv3_common.c   |  2 +-<br>
 hw/intc/rx_icu.c             |  4 +--<br>
 hw/misc/arm_sysctl.c         |  4 +--<br>
 hw/net/e1000e.c              |  6 ++--<br>
 target/arm/cpu.c             |  2 +-<br>
 target/sparc/cpu.c           |  2 +-<br>
 8 files changed, 63 insertions(+), 63 deletions(-)<br>
<br>
diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h<br>
index 2b00a1bcf6..7a08946448 100644<br>
--- a/include/hw/qdev-properties.h<br>
+++ b/include/hw/qdev-properties.h<br>
@@ -6,23 +6,23 @@<br>
<br>
 /*** qdev-properties.c ***/<br>
<br>
-extern const PropertyInfo qdev_prop_bit;<br>
-extern const PropertyInfo qdev_prop_bit64;<br>
-extern const PropertyInfo qdev_prop_bool;<br>
-extern const PropertyInfo qdev_prop_enum;<br>
-extern const PropertyInfo qdev_prop_uint8;<br>
-extern const PropertyInfo qdev_prop_uint16;<br>
-extern const PropertyInfo qdev_prop_uint32;<br>
-extern const PropertyInfo qdev_prop_int32;<br>
-extern const PropertyInfo qdev_prop_uint64;<br>
-extern const PropertyInfo qdev_prop_int64;<br>
-extern const PropertyInfo qdev_prop_size;<br>
-extern const PropertyInfo qdev_prop_string;<br>
-extern const PropertyInfo qdev_prop_on_off_auto;<br>
-extern const PropertyInfo qdev_prop_size32;<br>
-extern const PropertyInfo qdev_prop_uuid;<br>
-extern const PropertyInfo qdev_prop_arraylen;<br>
-extern const PropertyInfo qdev_prop_link;<br>
+extern const PropertyInfo prop_info_bit;<br>
+extern const PropertyInfo prop_info_bit64;<br>
+extern const PropertyInfo prop_info_bool;<br>
+extern const PropertyInfo prop_info_enum;<br>
+extern const PropertyInfo prop_info_uint8;<br>
+extern const PropertyInfo prop_info_uint16;<br>
+extern const PropertyInfo prop_info_uint32;<br>
+extern const PropertyInfo prop_info_int32;<br>
+extern const PropertyInfo prop_info_uint64;<br>
+extern const PropertyInfo prop_info_int64;<br>
+extern const PropertyInfo prop_info_size;<br>
+extern const PropertyInfo prop_info_string;<br>
+extern const PropertyInfo prop_info_on_off_auto;<br>
+extern const PropertyInfo prop_info_size32;<br>
+extern const PropertyInfo prop_info_uuid;<br>
+extern const PropertyInfo prop_info_arraylen;<br>
+extern const PropertyInfo prop_info_link;<br>
<br>
 #define DEFINE_PROP(_name, _state, _field, _prop, _type, ...) {  \<br>
         .name      = (_name),                                    \<br>
@@ -41,7 +41,7 @@ extern const PropertyInfo qdev_prop_link;<br>
     DEFINE_PROP(_name, _state, _field, _prop, _type)<br>
<br>
 #define DEFINE_PROP_BIT(_name, _state, _field, _bit, _defval)   \<br>
-    DEFINE_PROP(_name, _state, _field, qdev_prop_bit, uint32_t, \<br>
+    DEFINE_PROP(_name, _state, _field, prop_info_bit, uint32_t, \<br>
                 .bitnr       = (_bit),                          \<br>
                 .set_default = true,                            \<br>
                 .defval.u    = (bool)_defval)<br>
@@ -55,13 +55,13 @@ extern const PropertyInfo qdev_prop_link;<br>
     DEFINE_PROP(_name, _state, _field, _prop, _type)<br>
<br>
 #define DEFINE_PROP_BIT64(_name, _state, _field, _bit, _defval)   \<br>
-    DEFINE_PROP(_name, _state, _field, qdev_prop_bit64, uint64_t, \<br>
+    DEFINE_PROP(_name, _state, _field, prop_info_bit64, uint64_t, \<br>
                 .bitnr    = (_bit),                               \<br>
                 .set_default = true,                              \<br>
                 .defval.u  = (bool)_defval)<br>
<br>
 #define DEFINE_PROP_BOOL(_name, _state, _field, _defval)     \<br>
-    DEFINE_PROP(_name, _state, _field, qdev_prop_bool, bool, \<br>
+    DEFINE_PROP(_name, _state, _field, prop_info_bool, bool, \<br>
                 .set_default = true,                         \<br>
                 .defval.u    = (bool)_defval)<br>
<br>
@@ -94,7 +94,7 @@ extern const PropertyInfo qdev_prop_link;<br>
 #define DEFINE_PROP_ARRAY(_name, _state, _field,               \<br>
                           _arrayfield, _arrayprop, _arraytype) \<br>
     DEFINE_PROP((PROP_ARRAY_LEN_PREFIX _name),                 \<br>
-                _state, _field, qdev_prop_arraylen, uint32_t,  \<br>
+                _state, _field, prop_info_arraylen, uint32_t,  \<br>
                 .set_default = true,                           \<br>
                 .defval.u = 0,                                 \<br>
                 .arrayinfo = &amp;(_arrayprop),                    \<br>
@@ -102,34 +102,34 @@ extern const PropertyInfo qdev_prop_link;<br>
                 .arrayoffset = offsetof(_state, _arrayfield))<br>
<br>
 #define DEFINE_PROP_LINK(_name, _state, _field, _type, _ptr_type)     \<br>
-    DEFINE_PROP(_name, _state, _field, qdev_prop_link, _ptr_type,     \<br>
+    DEFINE_PROP(_name, _state, _field, prop_info_link, _ptr_type,     \<br>
                 .link_type  = _type)<br>
<br>
 #define DEFINE_PROP_UINT8(_n, _s, _f, _d)                       \<br>
-    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_uint8, uint8_t)<br>
+    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, prop_info_uint8, uint8_t)<br>
 #define DEFINE_PROP_UINT16(_n, _s, _f, _d)                      \<br>
-    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_uint16, uint16_t)<br>
+    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, prop_info_uint16, uint16_t)<br>
 #define DEFINE_PROP_UINT32(_n, _s, _f, _d)                      \<br>
-    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_uint32, uint32_t)<br>
+    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, prop_info_uint32, uint32_t)<br>
 #define DEFINE_PROP_INT32(_n, _s, _f, _d)                      \<br>
-    DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_int32, int32_t)<br>
+    DEFINE_PROP_SIGNED(_n, _s, _f, _d, prop_info_int32, int32_t)<br>
 #define DEFINE_PROP_UINT64(_n, _s, _f, _d)                      \<br>
-    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_uint64, uint64_t)<br>
+    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, prop_info_uint64, uint64_t)<br>
 #define DEFINE_PROP_INT64(_n, _s, _f, _d)                      \<br>
-    DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_int64, int64_t)<br>
+    DEFINE_PROP_SIGNED(_n, _s, _f, _d, prop_info_int64, int64_t)<br>
 #define DEFINE_PROP_SIZE(_n, _s, _f, _d)                       \<br>
-    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_size, uint64_t)<br>
+    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, prop_info_size, uint64_t)<br>
 #define DEFINE_PROP_STRING(_n, _s, _f)             \<br>
-    DEFINE_PROP(_n, _s, _f, qdev_prop_string, char*)<br>
+    DEFINE_PROP(_n, _s, _f, prop_info_string, char*)<br>
 #define DEFINE_PROP_ON_OFF_AUTO(_n, _s, _f, _d) \<br>
-    DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_on_off_auto, OnOffAuto)<br>
+    DEFINE_PROP_SIGNED(_n, _s, _f, _d, prop_info_on_off_auto, OnOffAuto)<br>
 #define DEFINE_PROP_SIZE32(_n, _s, _f, _d)                       \<br>
-    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_size32, uint32_t)<br>
+    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, prop_info_size32, uint32_t)<br>
 #define DEFINE_PROP_UUID(_name, _state, _field)                      \<br>
-    DEFINE_PROP(_name, _state, _field, qdev_prop_uuid, QemuUUID,     \<br>
+    DEFINE_PROP(_name, _state, _field, prop_info_uuid, QemuUUID,     \<br>
                 .set_default = true)<br>
 #define DEFINE_PROP_UUID_NODEFAULT(_name, _state, _field) \<br>
-    DEFINE_PROP(_name, _state, _field, qdev_prop_uuid, QemuUUID)<br>
+    DEFINE_PROP(_name, _state, _field, prop_info_uuid, QemuUUID)<br>
<br>
 #define DEFINE_PROP_END_OF_LIST()               \<br>
     {}<br>
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c<br>
index 1b27ba7236..59d65a7362 100644<br>
--- a/hw/core/qdev-properties.c<br>
+++ b/hw/core/qdev-properties.c<br>
@@ -76,7 +76,7 @@ void object_propinfo_set_default_value_enum(ObjectProperty *op,<br>
         qapi_enum_lookup(prop-&gt;info-&gt;enum_table, prop-&gt;defval.i));<br>
 }<br>
<br>
-const PropertyInfo qdev_prop_enum = {<br>
+const PropertyInfo prop_info_enum = {<br>
     .name  = &quot;enum&quot;,<br>
     .get   = object_propinfo_get_enum,<br>
     .set   = object_propinfo_set_enum,<br>
@@ -87,7 +87,7 @@ const PropertyInfo qdev_prop_enum = {<br>
<br>
 static uint32_t qdev_get_prop_mask(Property *prop)<br>
 {<br>
-    assert(prop-&gt;info == &amp;qdev_prop_bit);<br>
+    assert(prop-&gt;info == &amp;prop_info_bit);<br>
     return 0x1 &lt;&lt; prop-&gt;bitnr;<br>
 }<br>
<br>
@@ -129,7 +129,7 @@ static void set_default_value_bool(ObjectProperty *op, const Property *prop)<br>
     object_property_set_default_bool(op, prop-&gt;defval.u);<br>
 }<br>
<br>
-const PropertyInfo qdev_prop_bit = {<br>
+const PropertyInfo prop_info_bit = {<br>
     .name  = &quot;bool&quot;,<br>
     .description = &quot;on/off&quot;,<br>
     .get   = prop_get_bit,<br>
@@ -141,7 +141,7 @@ const PropertyInfo qdev_prop_bit = {<br>
<br>
 static uint64_t qdev_get_prop_mask64(Property *prop)<br>
 {<br>
-    assert(prop-&gt;info == &amp;qdev_prop_bit64);<br>
+    assert(prop-&gt;info == &amp;prop_info_bit64);<br>
     return 0x1ull &lt;&lt; prop-&gt;bitnr;<br>
 }<br>
<br>
@@ -178,7 +178,7 @@ static void prop_set_bit64(Object *obj, Visitor *v, const char *name,<br>
     bit64_prop_set(obj, prop, value);<br>
 }<br>
<br>
-const PropertyInfo qdev_prop_bit64 = {<br>
+const PropertyInfo prop_info_bit64 = {<br>
     .name  = &quot;bool&quot;,<br>
     .description = &quot;on/off&quot;,<br>
     .get   = prop_get_bit64,<br>
@@ -206,7 +206,7 @@ static void set_bool(Object *obj, Visitor *v, const char *name, void *opaque,<br>
     visit_type_bool(v, name, ptr, errp);<br>
 }<br>
<br>
-const PropertyInfo qdev_prop_bool = {<br>
+const PropertyInfo prop_info_bool = {<br>
     .name  = &quot;bool&quot;,<br>
     .get   = get_bool,<br>
     .set   = set_bool,<br>
@@ -245,7 +245,7 @@ void object_propinfo_set_default_value_uint(ObjectProperty *op,<br>
     object_property_set_default_uint(op, prop-&gt;defval.u);<br>
 }<br>
<br>
-const PropertyInfo qdev_prop_uint8 = {<br>
+const PropertyInfo prop_info_uint8 = {<br>
     .name  = &quot;uint8&quot;,<br>
     .get   = get_uint8,<br>
     .set   = set_uint8,<br>
@@ -272,7 +272,7 @@ static void set_uint16(Object *obj, Visitor *v, const char *name,<br>
     visit_type_uint16(v, name, ptr, errp);<br>
 }<br>
<br>
-const PropertyInfo qdev_prop_uint16 = {<br>
+const PropertyInfo prop_info_uint16 = {<br>
     .name  = &quot;uint16&quot;,<br>
     .get   = get_uint16,<br>
     .set   = set_uint16,<br>
@@ -317,14 +317,14 @@ static void set_int32(Object *obj, Visitor *v, const char *name, void *opaque,<br>
     visit_type_int32(v, name, ptr, errp);<br>
 }<br>
<br>
-const PropertyInfo qdev_prop_uint32 = {<br>
+const PropertyInfo prop_info_uint32 = {<br>
     .name  = &quot;uint32&quot;,<br>
     .get   = get_uint32,<br>
     .set   = set_uint32,<br>
     .set_default_value = object_propinfo_set_default_value_uint,<br>
 };<br>
<br>
-const PropertyInfo qdev_prop_int32 = {<br>
+const PropertyInfo prop_info_int32 = {<br>
     .name  = &quot;int32&quot;,<br>
     .get   = object_propinfo_get_int32,<br>
     .set   = set_int32,<br>
@@ -369,14 +369,14 @@ static void set_int64(Object *obj, Visitor *v, const char *name,<br>
     visit_type_int64(v, name, ptr, errp);<br>
 }<br>
<br>
-const PropertyInfo qdev_prop_uint64 = {<br>
+const PropertyInfo prop_info_uint64 = {<br>
     .name  = &quot;uint64&quot;,<br>
     .get   = get_uint64,<br>
     .set   = set_uint64,<br>
     .set_default_value = object_propinfo_set_default_value_uint,<br>
 };<br>
<br>
-const PropertyInfo qdev_prop_int64 = {<br>
+const PropertyInfo prop_info_int64 = {<br>
     .name  = &quot;int64&quot;,<br>
     .get   = get_int64,<br>
     .set   = set_int64,<br>
@@ -419,7 +419,7 @@ static void set_string(Object *obj, Visitor *v, const char *name,<br>
     *ptr = str;<br>
 }<br>
<br>
-const PropertyInfo qdev_prop_string = {<br>
+const PropertyInfo prop_info_string = {<br>
     .name  = &quot;str&quot;,<br>
     .release = release_string,<br>
     .get   = get_string,<br>
@@ -428,7 +428,7 @@ const PropertyInfo qdev_prop_string = {<br>
<br>
 /* --- on/off/auto --- */<br>
<br>
-const PropertyInfo qdev_prop_on_off_auto = {<br>
+const PropertyInfo prop_info_on_off_auto = {<br>
     .name = &quot;OnOffAuto&quot;,<br>
     .description = &quot;on/off/auto&quot;,<br>
     .enum_table = &amp;OnOffAuto_lookup,<br>
@@ -471,7 +471,7 @@ static void set_size32(Object *obj, Visitor *v, const char *name, void *opaque,<br>
     *ptr = value;<br>
 }<br>
<br>
-const PropertyInfo qdev_prop_size32 = {<br>
+const PropertyInfo prop_info_size32 = {<br>
     .name  = &quot;size&quot;,<br>
     .get = object_propinfo_get_size32,<br>
     .set = set_size32,<br>
@@ -519,7 +519,7 @@ static void set_default_uuid_auto(ObjectProperty *op, const Property *prop)<br>
     object_property_set_default_str(op, UUID_VALUE_AUTO);<br>
 }<br>
<br>
-const PropertyInfo qdev_prop_uuid = {<br>
+const PropertyInfo prop_info_uuid = {<br>
     .name  = &quot;str&quot;,<br>
     .description = &quot;UUID (aka GUID) or \&quot;&quot; UUID_VALUE_AUTO<br>
         &quot;\&quot; for random value (default)&quot;,<br>
@@ -640,7 +640,7 @@ static void set_prop_arraylen(Object *obj, Visitor *v, const char *name,<br>
     }<br>
 }<br>
<br>
-const PropertyInfo qdev_prop_arraylen = {<br>
+const PropertyInfo prop_info_arraylen = {<br>
     .name = &quot;uint32&quot;,<br>
     .get = get_uint32,<br>
     .set = set_prop_arraylen,<br>
@@ -839,7 +839,7 @@ static void set_size(Object *obj, Visitor *v, const char *name, void *opaque,<br>
     visit_type_size(v, name, ptr, errp);<br>
 }<br>
<br>
-const PropertyInfo qdev_prop_size = {<br>
+const PropertyInfo prop_info_size = {<br>
     .name  = &quot;size&quot;,<br>
     .get = get_size,<br>
     .set = set_size,<br>
@@ -860,7 +860,7 @@ static ObjectProperty *create_link_property(ObjectClass *oc, Property *prop)<br>
                                           OBJ_PROP_LINK_STRONG);<br>
 }<br>
<br>
-const PropertyInfo qdev_prop_link = {<br>
+const PropertyInfo prop_info_link = {<br>
     .name = &quot;link&quot;,<br>
     .create = create_link_property,<br>
 };<br>
diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c<br>
index 58ef65f589..6d06b4d4c5 100644<br>
--- a/hw/intc/arm_gicv3_common.c<br>
+++ b/hw/intc/arm_gicv3_common.c<br>
@@ -496,7 +496,7 @@ static Property arm_gicv3_common_properties[] = {<br>
     DEFINE_PROP_UINT32(&quot;revision&quot;, GICv3State, revision, 3),<br>
     DEFINE_PROP_BOOL(&quot;has-security-extensions&quot;, GICv3State, security_extn, 0),<br>
     DEFINE_PROP_ARRAY(&quot;redist-region-count&quot;, GICv3State, nb_redist_regions,<br>
-                      redist_region_count, qdev_prop_uint32, uint32_t),<br>
+                      redist_region_count, prop_info_uint32, uint32_t),<br>
     DEFINE_PROP_END_OF_LIST(),<br>
 };<br>
<br>
diff --git a/hw/intc/rx_icu.c b/hw/intc/rx_icu.c<br>
index 94e17a9dea..823160d9a8 100644<br>
--- a/hw/intc/rx_icu.c<br>
+++ b/hw/intc/rx_icu.c<br>
@@ -365,9 +365,9 @@ static const VMStateDescription vmstate_rxicu = {<br>
<br>
 static Property rxicu_properties[] = {<br>
     DEFINE_PROP_ARRAY(&quot;ipr-map&quot;, RXICUState, nr_irqs, map,<br>
-                      qdev_prop_uint8, uint8_t),<br>
+                      prop_info_uint8, uint8_t),<br>
     DEFINE_PROP_ARRAY(&quot;trigger-level&quot;, RXICUState, nr_sense, init_sense,<br>
-                      qdev_prop_uint8, uint8_t),<br>
+                      prop_info_uint8, uint8_t),<br>
     DEFINE_PROP_END_OF_LIST(),<br>
 };<br>
<br>
diff --git a/hw/misc/arm_sysctl.c b/hw/misc/arm_sysctl.c<br>
index 42d4693854..634f3d916f 100644<br>
--- a/hw/misc/arm_sysctl.c<br>
+++ b/hw/misc/arm_sysctl.c<br>
@@ -628,10 +628,10 @@ static Property arm_sysctl_properties[] = {<br>
     DEFINE_PROP_UINT32(&quot;proc_id&quot;, arm_sysctl_state, proc_id, 0),<br>
     /* Daughterboard power supply voltages (as reported via SYS_CFG) */<br>
     DEFINE_PROP_ARRAY(&quot;db-voltage&quot;, arm_sysctl_state, db_num_vsensors,<br>
-                      db_voltage, qdev_prop_uint32, uint32_t),<br>
+                      db_voltage, prop_info_uint32, uint32_t),<br>
     /* Daughterboard clock reset values (as reported via SYS_CFG) */<br>
     DEFINE_PROP_ARRAY(&quot;db-clock&quot;, arm_sysctl_state, db_num_clocks,<br>
-                      db_clock_reset, qdev_prop_uint32, uint32_t),<br>
+                      db_clock_reset, prop_info_uint32, uint32_t),<br>
     DEFINE_PROP_END_OF_LIST(),<br>
 };<br>
<br>
diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c<br>
index b6f1ae3c8f..7928939ae2 100644<br>
--- a/hw/net/e1000e.c<br>
+++ b/hw/net/e1000e.c<br>
@@ -686,15 +686,15 @@ static void e1000e_class_init(ObjectClass *class, void *data)<br>
     dc-&gt;reset = e1000e_qdev_reset;<br>
     dc-&gt;vmsd = &amp;e1000e_vmstate;<br>
<br>
-    e1000e_prop_disable_vnet = qdev_prop_uint8;<br>
+    e1000e_prop_disable_vnet = prop_info_uint8;<br>
     e1000e_prop_disable_vnet.description = &quot;Do not use virtio headers, &quot;<br>
                                            &quot;perform SW offloads emulation &quot;<br>
                                            &quot;instead&quot;;<br>
<br>
-    e1000e_prop_subsys_ven = qdev_prop_uint16;<br>
+    e1000e_prop_subsys_ven = prop_info_uint16;<br>
     e1000e_prop_subsys_ven.description = &quot;PCI device Subsystem Vendor ID&quot;;<br>
<br>
-    e1000e_prop_subsys = qdev_prop_uint16;<br>
+    e1000e_prop_subsys = prop_info_uint16;<br>
     e1000e_prop_subsys.description = &quot;PCI device Subsystem ID&quot;;<br>
<br>
     device_class_set_props(dc, e1000e_properties);<br>
diff --git a/target/arm/cpu.c b/target/arm/cpu.c<br>
index 07492e9f9a..cef92879b0 100644<br>
--- a/target/arm/cpu.c<br>
+++ b/target/arm/cpu.c<br>
@@ -1108,7 +1108,7 @@ static Property arm_cpu_has_mpu_property =<br>
 static Property arm_cpu_pmsav7_dregion_property =<br>
             DEFINE_PROP_UNSIGNED_NODEFAULT(&quot;pmsav7-dregion&quot;, ARMCPU,<br>
                                            pmsav7_dregion,<br>
-                                           qdev_prop_uint32, uint32_t);<br>
+                                           prop_info_uint32, uint32_t);<br>
<br>
 static bool arm_get_pmu(Object *obj, Error **errp)<br>
 {<br>
diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c<br>
index cf21efd85f..a03ec9b0e8 100644<br>
--- a/target/sparc/cpu.c<br>
+++ b/target/sparc/cpu.c<br>
@@ -839,7 +839,7 @@ static Property sparc_cpu_properties[] = {<br>
     DEFINE_PROP_BIT(&quot;cmt&quot;,      SPARCCPU, env.def.features, 12, false),<br>
     DEFINE_PROP_BIT(&quot;gl&quot;,       SPARCCPU, env.def.features, 13, false),<br>
     DEFINE_PROP_UNSIGNED(&quot;iu-version&quot;, SPARCCPU, env.def.iu_version, 0,<br>
-                         qdev_prop_uint64, target_ulong),<br>
+                         prop_info_uint64, target_ulong),<br>
     DEFINE_PROP_UINT32(&quot;fpu-version&quot;, SPARCCPU, env.def.fpu_version, 0),<br>
     DEFINE_PROP_UINT32(&quot;mmu-version&quot;, SPARCCPU, env.def.mmu_version, 0),<br>
     { .name  = &quot;nwindows&quot;, .info  = &amp;qdev_prop_nwindows },<br>
-- <br>
2.28.0<br>
<br>
<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">Marc-André Lureau<br></div></div>
diff mbox series

Patch

diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h
index 2b00a1bcf6..7a08946448 100644
--- a/include/hw/qdev-properties.h
+++ b/include/hw/qdev-properties.h
@@ -6,23 +6,23 @@ 
 
 /*** qdev-properties.c ***/
 
-extern const PropertyInfo qdev_prop_bit;
-extern const PropertyInfo qdev_prop_bit64;
-extern const PropertyInfo qdev_prop_bool;
-extern const PropertyInfo qdev_prop_enum;
-extern const PropertyInfo qdev_prop_uint8;
-extern const PropertyInfo qdev_prop_uint16;
-extern const PropertyInfo qdev_prop_uint32;
-extern const PropertyInfo qdev_prop_int32;
-extern const PropertyInfo qdev_prop_uint64;
-extern const PropertyInfo qdev_prop_int64;
-extern const PropertyInfo qdev_prop_size;
-extern const PropertyInfo qdev_prop_string;
-extern const PropertyInfo qdev_prop_on_off_auto;
-extern const PropertyInfo qdev_prop_size32;
-extern const PropertyInfo qdev_prop_uuid;
-extern const PropertyInfo qdev_prop_arraylen;
-extern const PropertyInfo qdev_prop_link;
+extern const PropertyInfo prop_info_bit;
+extern const PropertyInfo prop_info_bit64;
+extern const PropertyInfo prop_info_bool;
+extern const PropertyInfo prop_info_enum;
+extern const PropertyInfo prop_info_uint8;
+extern const PropertyInfo prop_info_uint16;
+extern const PropertyInfo prop_info_uint32;
+extern const PropertyInfo prop_info_int32;
+extern const PropertyInfo prop_info_uint64;
+extern const PropertyInfo prop_info_int64;
+extern const PropertyInfo prop_info_size;
+extern const PropertyInfo prop_info_string;
+extern const PropertyInfo prop_info_on_off_auto;
+extern const PropertyInfo prop_info_size32;
+extern const PropertyInfo prop_info_uuid;
+extern const PropertyInfo prop_info_arraylen;
+extern const PropertyInfo prop_info_link;
 
 #define DEFINE_PROP(_name, _state, _field, _prop, _type, ...) {  \
         .name      = (_name),                                    \
@@ -41,7 +41,7 @@  extern const PropertyInfo qdev_prop_link;
     DEFINE_PROP(_name, _state, _field, _prop, _type)
 
 #define DEFINE_PROP_BIT(_name, _state, _field, _bit, _defval)   \
-    DEFINE_PROP(_name, _state, _field, qdev_prop_bit, uint32_t, \
+    DEFINE_PROP(_name, _state, _field, prop_info_bit, uint32_t, \
                 .bitnr       = (_bit),                          \
                 .set_default = true,                            \
                 .defval.u    = (bool)_defval)
@@ -55,13 +55,13 @@  extern const PropertyInfo qdev_prop_link;
     DEFINE_PROP(_name, _state, _field, _prop, _type)
 
 #define DEFINE_PROP_BIT64(_name, _state, _field, _bit, _defval)   \
-    DEFINE_PROP(_name, _state, _field, qdev_prop_bit64, uint64_t, \
+    DEFINE_PROP(_name, _state, _field, prop_info_bit64, uint64_t, \
                 .bitnr    = (_bit),                               \
                 .set_default = true,                              \
                 .defval.u  = (bool)_defval)
 
 #define DEFINE_PROP_BOOL(_name, _state, _field, _defval)     \
-    DEFINE_PROP(_name, _state, _field, qdev_prop_bool, bool, \
+    DEFINE_PROP(_name, _state, _field, prop_info_bool, bool, \
                 .set_default = true,                         \
                 .defval.u    = (bool)_defval)
 
@@ -94,7 +94,7 @@  extern const PropertyInfo qdev_prop_link;
 #define DEFINE_PROP_ARRAY(_name, _state, _field,               \
                           _arrayfield, _arrayprop, _arraytype) \
     DEFINE_PROP((PROP_ARRAY_LEN_PREFIX _name),                 \
-                _state, _field, qdev_prop_arraylen, uint32_t,  \
+                _state, _field, prop_info_arraylen, uint32_t,  \
                 .set_default = true,                           \
                 .defval.u = 0,                                 \
                 .arrayinfo = &(_arrayprop),                    \
@@ -102,34 +102,34 @@  extern const PropertyInfo qdev_prop_link;
                 .arrayoffset = offsetof(_state, _arrayfield))
 
 #define DEFINE_PROP_LINK(_name, _state, _field, _type, _ptr_type)     \
-    DEFINE_PROP(_name, _state, _field, qdev_prop_link, _ptr_type,     \
+    DEFINE_PROP(_name, _state, _field, prop_info_link, _ptr_type,     \
                 .link_type  = _type)
 
 #define DEFINE_PROP_UINT8(_n, _s, _f, _d)                       \
-    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_uint8, uint8_t)
+    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, prop_info_uint8, uint8_t)
 #define DEFINE_PROP_UINT16(_n, _s, _f, _d)                      \
-    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_uint16, uint16_t)
+    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, prop_info_uint16, uint16_t)
 #define DEFINE_PROP_UINT32(_n, _s, _f, _d)                      \
-    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_uint32, uint32_t)
+    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, prop_info_uint32, uint32_t)
 #define DEFINE_PROP_INT32(_n, _s, _f, _d)                      \
-    DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_int32, int32_t)
+    DEFINE_PROP_SIGNED(_n, _s, _f, _d, prop_info_int32, int32_t)
 #define DEFINE_PROP_UINT64(_n, _s, _f, _d)                      \
-    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_uint64, uint64_t)
+    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, prop_info_uint64, uint64_t)
 #define DEFINE_PROP_INT64(_n, _s, _f, _d)                      \
-    DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_int64, int64_t)
+    DEFINE_PROP_SIGNED(_n, _s, _f, _d, prop_info_int64, int64_t)
 #define DEFINE_PROP_SIZE(_n, _s, _f, _d)                       \
-    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_size, uint64_t)
+    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, prop_info_size, uint64_t)
 #define DEFINE_PROP_STRING(_n, _s, _f)             \
-    DEFINE_PROP(_n, _s, _f, qdev_prop_string, char*)
+    DEFINE_PROP(_n, _s, _f, prop_info_string, char*)
 #define DEFINE_PROP_ON_OFF_AUTO(_n, _s, _f, _d) \
-    DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_on_off_auto, OnOffAuto)
+    DEFINE_PROP_SIGNED(_n, _s, _f, _d, prop_info_on_off_auto, OnOffAuto)
 #define DEFINE_PROP_SIZE32(_n, _s, _f, _d)                       \
-    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_size32, uint32_t)
+    DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, prop_info_size32, uint32_t)
 #define DEFINE_PROP_UUID(_name, _state, _field)                      \
-    DEFINE_PROP(_name, _state, _field, qdev_prop_uuid, QemuUUID,     \
+    DEFINE_PROP(_name, _state, _field, prop_info_uuid, QemuUUID,     \
                 .set_default = true)
 #define DEFINE_PROP_UUID_NODEFAULT(_name, _state, _field) \
-    DEFINE_PROP(_name, _state, _field, qdev_prop_uuid, QemuUUID)
+    DEFINE_PROP(_name, _state, _field, prop_info_uuid, QemuUUID)
 
 #define DEFINE_PROP_END_OF_LIST()               \
     {}
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index 1b27ba7236..59d65a7362 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -76,7 +76,7 @@  void object_propinfo_set_default_value_enum(ObjectProperty *op,
         qapi_enum_lookup(prop->info->enum_table, prop->defval.i));
 }
 
-const PropertyInfo qdev_prop_enum = {
+const PropertyInfo prop_info_enum = {
     .name  = "enum",
     .get   = object_propinfo_get_enum,
     .set   = object_propinfo_set_enum,
@@ -87,7 +87,7 @@  const PropertyInfo qdev_prop_enum = {
 
 static uint32_t qdev_get_prop_mask(Property *prop)
 {
-    assert(prop->info == &qdev_prop_bit);
+    assert(prop->info == &prop_info_bit);
     return 0x1 << prop->bitnr;
 }
 
@@ -129,7 +129,7 @@  static void set_default_value_bool(ObjectProperty *op, const Property *prop)
     object_property_set_default_bool(op, prop->defval.u);
 }
 
-const PropertyInfo qdev_prop_bit = {
+const PropertyInfo prop_info_bit = {
     .name  = "bool",
     .description = "on/off",
     .get   = prop_get_bit,
@@ -141,7 +141,7 @@  const PropertyInfo qdev_prop_bit = {
 
 static uint64_t qdev_get_prop_mask64(Property *prop)
 {
-    assert(prop->info == &qdev_prop_bit64);
+    assert(prop->info == &prop_info_bit64);
     return 0x1ull << prop->bitnr;
 }
 
@@ -178,7 +178,7 @@  static void prop_set_bit64(Object *obj, Visitor *v, const char *name,
     bit64_prop_set(obj, prop, value);
 }
 
-const PropertyInfo qdev_prop_bit64 = {
+const PropertyInfo prop_info_bit64 = {
     .name  = "bool",
     .description = "on/off",
     .get   = prop_get_bit64,
@@ -206,7 +206,7 @@  static void set_bool(Object *obj, Visitor *v, const char *name, void *opaque,
     visit_type_bool(v, name, ptr, errp);
 }
 
-const PropertyInfo qdev_prop_bool = {
+const PropertyInfo prop_info_bool = {
     .name  = "bool",
     .get   = get_bool,
     .set   = set_bool,
@@ -245,7 +245,7 @@  void object_propinfo_set_default_value_uint(ObjectProperty *op,
     object_property_set_default_uint(op, prop->defval.u);
 }
 
-const PropertyInfo qdev_prop_uint8 = {
+const PropertyInfo prop_info_uint8 = {
     .name  = "uint8",
     .get   = get_uint8,
     .set   = set_uint8,
@@ -272,7 +272,7 @@  static void set_uint16(Object *obj, Visitor *v, const char *name,
     visit_type_uint16(v, name, ptr, errp);
 }
 
-const PropertyInfo qdev_prop_uint16 = {
+const PropertyInfo prop_info_uint16 = {
     .name  = "uint16",
     .get   = get_uint16,
     .set   = set_uint16,
@@ -317,14 +317,14 @@  static void set_int32(Object *obj, Visitor *v, const char *name, void *opaque,
     visit_type_int32(v, name, ptr, errp);
 }
 
-const PropertyInfo qdev_prop_uint32 = {
+const PropertyInfo prop_info_uint32 = {
     .name  = "uint32",
     .get   = get_uint32,
     .set   = set_uint32,
     .set_default_value = object_propinfo_set_default_value_uint,
 };
 
-const PropertyInfo qdev_prop_int32 = {
+const PropertyInfo prop_info_int32 = {
     .name  = "int32",
     .get   = object_propinfo_get_int32,
     .set   = set_int32,
@@ -369,14 +369,14 @@  static void set_int64(Object *obj, Visitor *v, const char *name,
     visit_type_int64(v, name, ptr, errp);
 }
 
-const PropertyInfo qdev_prop_uint64 = {
+const PropertyInfo prop_info_uint64 = {
     .name  = "uint64",
     .get   = get_uint64,
     .set   = set_uint64,
     .set_default_value = object_propinfo_set_default_value_uint,
 };
 
-const PropertyInfo qdev_prop_int64 = {
+const PropertyInfo prop_info_int64 = {
     .name  = "int64",
     .get   = get_int64,
     .set   = set_int64,
@@ -419,7 +419,7 @@  static void set_string(Object *obj, Visitor *v, const char *name,
     *ptr = str;
 }
 
-const PropertyInfo qdev_prop_string = {
+const PropertyInfo prop_info_string = {
     .name  = "str",
     .release = release_string,
     .get   = get_string,
@@ -428,7 +428,7 @@  const PropertyInfo qdev_prop_string = {
 
 /* --- on/off/auto --- */
 
-const PropertyInfo qdev_prop_on_off_auto = {
+const PropertyInfo prop_info_on_off_auto = {
     .name = "OnOffAuto",
     .description = "on/off/auto",
     .enum_table = &OnOffAuto_lookup,
@@ -471,7 +471,7 @@  static void set_size32(Object *obj, Visitor *v, const char *name, void *opaque,
     *ptr = value;
 }
 
-const PropertyInfo qdev_prop_size32 = {
+const PropertyInfo prop_info_size32 = {
     .name  = "size",
     .get = object_propinfo_get_size32,
     .set = set_size32,
@@ -519,7 +519,7 @@  static void set_default_uuid_auto(ObjectProperty *op, const Property *prop)
     object_property_set_default_str(op, UUID_VALUE_AUTO);
 }
 
-const PropertyInfo qdev_prop_uuid = {
+const PropertyInfo prop_info_uuid = {
     .name  = "str",
     .description = "UUID (aka GUID) or \"" UUID_VALUE_AUTO
         "\" for random value (default)",
@@ -640,7 +640,7 @@  static void set_prop_arraylen(Object *obj, Visitor *v, const char *name,
     }
 }
 
-const PropertyInfo qdev_prop_arraylen = {
+const PropertyInfo prop_info_arraylen = {
     .name = "uint32",
     .get = get_uint32,
     .set = set_prop_arraylen,
@@ -839,7 +839,7 @@  static void set_size(Object *obj, Visitor *v, const char *name, void *opaque,
     visit_type_size(v, name, ptr, errp);
 }
 
-const PropertyInfo qdev_prop_size = {
+const PropertyInfo prop_info_size = {
     .name  = "size",
     .get = get_size,
     .set = set_size,
@@ -860,7 +860,7 @@  static ObjectProperty *create_link_property(ObjectClass *oc, Property *prop)
                                           OBJ_PROP_LINK_STRONG);
 }
 
-const PropertyInfo qdev_prop_link = {
+const PropertyInfo prop_info_link = {
     .name = "link",
     .create = create_link_property,
 };
diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c
index 58ef65f589..6d06b4d4c5 100644
--- a/hw/intc/arm_gicv3_common.c
+++ b/hw/intc/arm_gicv3_common.c
@@ -496,7 +496,7 @@  static Property arm_gicv3_common_properties[] = {
     DEFINE_PROP_UINT32("revision", GICv3State, revision, 3),
     DEFINE_PROP_BOOL("has-security-extensions", GICv3State, security_extn, 0),
     DEFINE_PROP_ARRAY("redist-region-count", GICv3State, nb_redist_regions,
-                      redist_region_count, qdev_prop_uint32, uint32_t),
+                      redist_region_count, prop_info_uint32, uint32_t),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/hw/intc/rx_icu.c b/hw/intc/rx_icu.c
index 94e17a9dea..823160d9a8 100644
--- a/hw/intc/rx_icu.c
+++ b/hw/intc/rx_icu.c
@@ -365,9 +365,9 @@  static const VMStateDescription vmstate_rxicu = {
 
 static Property rxicu_properties[] = {
     DEFINE_PROP_ARRAY("ipr-map", RXICUState, nr_irqs, map,
-                      qdev_prop_uint8, uint8_t),
+                      prop_info_uint8, uint8_t),
     DEFINE_PROP_ARRAY("trigger-level", RXICUState, nr_sense, init_sense,
-                      qdev_prop_uint8, uint8_t),
+                      prop_info_uint8, uint8_t),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/hw/misc/arm_sysctl.c b/hw/misc/arm_sysctl.c
index 42d4693854..634f3d916f 100644
--- a/hw/misc/arm_sysctl.c
+++ b/hw/misc/arm_sysctl.c
@@ -628,10 +628,10 @@  static Property arm_sysctl_properties[] = {
     DEFINE_PROP_UINT32("proc_id", arm_sysctl_state, proc_id, 0),
     /* Daughterboard power supply voltages (as reported via SYS_CFG) */
     DEFINE_PROP_ARRAY("db-voltage", arm_sysctl_state, db_num_vsensors,
-                      db_voltage, qdev_prop_uint32, uint32_t),
+                      db_voltage, prop_info_uint32, uint32_t),
     /* Daughterboard clock reset values (as reported via SYS_CFG) */
     DEFINE_PROP_ARRAY("db-clock", arm_sysctl_state, db_num_clocks,
-                      db_clock_reset, qdev_prop_uint32, uint32_t),
+                      db_clock_reset, prop_info_uint32, uint32_t),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c
index b6f1ae3c8f..7928939ae2 100644
--- a/hw/net/e1000e.c
+++ b/hw/net/e1000e.c
@@ -686,15 +686,15 @@  static void e1000e_class_init(ObjectClass *class, void *data)
     dc->reset = e1000e_qdev_reset;
     dc->vmsd = &e1000e_vmstate;
 
-    e1000e_prop_disable_vnet = qdev_prop_uint8;
+    e1000e_prop_disable_vnet = prop_info_uint8;
     e1000e_prop_disable_vnet.description = "Do not use virtio headers, "
                                            "perform SW offloads emulation "
                                            "instead";
 
-    e1000e_prop_subsys_ven = qdev_prop_uint16;
+    e1000e_prop_subsys_ven = prop_info_uint16;
     e1000e_prop_subsys_ven.description = "PCI device Subsystem Vendor ID";
 
-    e1000e_prop_subsys = qdev_prop_uint16;
+    e1000e_prop_subsys = prop_info_uint16;
     e1000e_prop_subsys.description = "PCI device Subsystem ID";
 
     device_class_set_props(dc, e1000e_properties);
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 07492e9f9a..cef92879b0 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -1108,7 +1108,7 @@  static Property arm_cpu_has_mpu_property =
 static Property arm_cpu_pmsav7_dregion_property =
             DEFINE_PROP_UNSIGNED_NODEFAULT("pmsav7-dregion", ARMCPU,
                                            pmsav7_dregion,
-                                           qdev_prop_uint32, uint32_t);
+                                           prop_info_uint32, uint32_t);
 
 static bool arm_get_pmu(Object *obj, Error **errp)
 {
diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c
index cf21efd85f..a03ec9b0e8 100644
--- a/target/sparc/cpu.c
+++ b/target/sparc/cpu.c
@@ -839,7 +839,7 @@  static Property sparc_cpu_properties[] = {
     DEFINE_PROP_BIT("cmt",      SPARCCPU, env.def.features, 12, false),
     DEFINE_PROP_BIT("gl",       SPARCCPU, env.def.features, 13, false),
     DEFINE_PROP_UNSIGNED("iu-version", SPARCCPU, env.def.iu_version, 0,
-                         qdev_prop_uint64, target_ulong),
+                         prop_info_uint64, target_ulong),
     DEFINE_PROP_UINT32("fpu-version", SPARCCPU, env.def.fpu_version, 0),
     DEFINE_PROP_UINT32("mmu-version", SPARCCPU, env.def.mmu_version, 0),
     { .name  = "nwindows", .info  = &qdev_prop_nwindows },