diff options
author | Fam Zheng <famz@redhat.com> | 2017-07-14 10:14:54 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-07-14 12:04:42 +0200 |
commit | 1b6b7d109ea53157525ad787802e45773fb7becb (patch) | |
tree | 05d588b41ddbed6fa9fa2c06d954840628078f01 /include | |
parent | 75ab905383ea92d1c44cdd07e0f9fd509d51c9cc (diff) |
qdev: Add const qualifier to PropertyInfo definitions
The remaining non-const ones are in e1000e which modifies description at
runtime. They can be addressed separatedly.
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20170714021509.23681-6-famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/qdev-core.h | 4 | ||||
-rw-r--r-- | include/hw/qdev-properties.h | 52 | ||||
-rw-r--r-- | include/hw/s390x/css.h | 4 |
3 files changed, 30 insertions, 30 deletions
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 08d1d2c6f9..53488153fd 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -223,7 +223,7 @@ struct BusState { struct Property { const char *name; - PropertyInfo *info; + const PropertyInfo *info; ptrdiff_t offset; uint8_t bitnr; union { @@ -231,7 +231,7 @@ struct Property { uint64_t u; } defval; int arrayoffset; - PropertyInfo *arrayinfo; + const PropertyInfo *arrayinfo; int arrayfieldsize; const char *link_type; }; diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index 876ba2e283..f6692d5dc3 100644 --- a/include/hw/qdev-properties.h +++ b/include/hw/qdev-properties.h @@ -5,32 +5,32 @@ /*** qdev-properties.c ***/ -extern PropertyInfo qdev_prop_bit; -extern PropertyInfo qdev_prop_bit64; -extern PropertyInfo qdev_prop_bool; -extern PropertyInfo qdev_prop_uint8; -extern PropertyInfo qdev_prop_uint16; -extern PropertyInfo qdev_prop_uint32; -extern PropertyInfo qdev_prop_int32; -extern PropertyInfo qdev_prop_uint64; -extern PropertyInfo qdev_prop_size; -extern PropertyInfo qdev_prop_string; -extern PropertyInfo qdev_prop_chr; -extern PropertyInfo qdev_prop_ptr; -extern PropertyInfo qdev_prop_macaddr; -extern PropertyInfo qdev_prop_on_off_auto; -extern PropertyInfo qdev_prop_losttickpolicy; -extern PropertyInfo qdev_prop_blockdev_on_error; -extern PropertyInfo qdev_prop_bios_chs_trans; -extern PropertyInfo qdev_prop_fdc_drive_type; -extern PropertyInfo qdev_prop_drive; -extern PropertyInfo qdev_prop_netdev; -extern PropertyInfo qdev_prop_vlan; -extern PropertyInfo qdev_prop_pci_devfn; -extern PropertyInfo qdev_prop_blocksize; -extern PropertyInfo qdev_prop_pci_host_devaddr; -extern PropertyInfo qdev_prop_arraylen; -extern PropertyInfo qdev_prop_link; +extern const PropertyInfo qdev_prop_bit; +extern const PropertyInfo qdev_prop_bit64; +extern const PropertyInfo qdev_prop_bool; +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_size; +extern const PropertyInfo qdev_prop_string; +extern const PropertyInfo qdev_prop_chr; +extern const PropertyInfo qdev_prop_ptr; +extern const PropertyInfo qdev_prop_macaddr; +extern const PropertyInfo qdev_prop_on_off_auto; +extern const PropertyInfo qdev_prop_losttickpolicy; +extern const PropertyInfo qdev_prop_blockdev_on_error; +extern const PropertyInfo qdev_prop_bios_chs_trans; +extern const PropertyInfo qdev_prop_fdc_drive_type; +extern const PropertyInfo qdev_prop_drive; +extern const PropertyInfo qdev_prop_netdev; +extern const PropertyInfo qdev_prop_vlan; +extern const PropertyInfo qdev_prop_pci_devfn; +extern const PropertyInfo qdev_prop_blocksize; +extern const PropertyInfo qdev_prop_pci_host_devaddr; +extern const PropertyInfo qdev_prop_arraylen; +extern const PropertyInfo qdev_prop_link; #define DEFINE_PROP(_name, _state, _field, _prop, _type) { \ .name = (_name), \ diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h index eb0e26f258..dc1001bee1 100644 --- a/include/hw/s390x/css.h +++ b/include/hw/s390x/css.h @@ -112,7 +112,7 @@ typedef struct CssDevId { bool valid; } CssDevId; -extern PropertyInfo css_devid_propinfo; +extern const PropertyInfo css_devid_propinfo; #define DEFINE_PROP_CSS_DEV_ID(_n, _s, _f) \ DEFINE_PROP(_n, _s, _f, css_devid_propinfo, CssDevId) @@ -196,7 +196,7 @@ int css_do_rchp(uint8_t cssid, uint8_t chpid); bool css_present(uint8_t cssid); #endif -extern PropertyInfo css_devid_ro_propinfo; +extern const PropertyInfo css_devid_ro_propinfo; #define DEFINE_PROP_CSS_DEV_ID_RO(_n, _s, _f) \ DEFINE_PROP(_n, _s, _f, css_devid_ro_propinfo, CssDevId) |