mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST
Now that all of the Property arrays are counted, we can remove the terminator object from each array. Update the assertions in device_class_set_props to match. With struct Property being 88 bytes, this was a rather large form of terminator. Saves 30k from qemu-system-aarch64. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-21-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
ebe9685f12
commit
5fcabe628b
556 changed files with 7 additions and 624 deletions
|
@ -145,7 +145,6 @@ static void nvram_sysbus_realize(DeviceState *dev, Error **errp)
|
|||
static const Property nvram_sysbus_properties[] = {
|
||||
DEFINE_PROP_UINT32("size", SysBusNvRamState, nvram.chip_size, 0x2000),
|
||||
DEFINE_PROP_STRING("filename", SysBusNvRamState, nvram.filename),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void nvram_sysbus_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -239,7 +239,6 @@ static const Property at24c_eeprom_props[] = {
|
|||
DEFINE_PROP_UINT8("address-size", EEPROMState, asize, 0),
|
||||
DEFINE_PROP_BOOL("writable", EEPROMState, writable, true),
|
||||
DEFINE_PROP_DRIVE("drive", EEPROMState, blk),
|
||||
DEFINE_PROP_END_OF_LIST()
|
||||
};
|
||||
|
||||
static
|
||||
|
|
|
@ -1084,7 +1084,6 @@ static void fw_cfg_machine_ready(struct Notifier *n, void *data)
|
|||
|
||||
static const Property fw_cfg_properties[] = {
|
||||
DEFINE_PROP_BOOL("acpi-mr-restore", FWCfgState, acpi_mr_restore, true),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void fw_cfg_common_realize(DeviceState *dev, Error **errp)
|
||||
|
@ -1278,7 +1277,6 @@ static const Property fw_cfg_io_properties[] = {
|
|||
true),
|
||||
DEFINE_PROP_UINT16("x-file-slots", FWCfgIoState, parent_obj.file_slots,
|
||||
FW_CFG_FILE_SLOTS_DFLT),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void fw_cfg_io_realize(DeviceState *dev, Error **errp)
|
||||
|
@ -1328,7 +1326,6 @@ static const Property fw_cfg_mem_properties[] = {
|
|||
true),
|
||||
DEFINE_PROP_UINT16("x-file-slots", FWCfgMemState, parent_obj.file_slots,
|
||||
FW_CFG_FILE_SLOTS_DFLT),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void fw_cfg_mem_realize(DeviceState *dev, Error **errp)
|
||||
|
|
|
@ -138,7 +138,6 @@ static const Property macio_nvram_properties[] = {
|
|||
DEFINE_PROP_UINT32("size", MacIONVRAMState, size, 0),
|
||||
DEFINE_PROP_UINT32("it_shift", MacIONVRAMState, it_shift, 0),
|
||||
DEFINE_PROP_DRIVE("drive", MacIONVRAMState, blk),
|
||||
DEFINE_PROP_END_OF_LIST()
|
||||
};
|
||||
|
||||
static void macio_nvram_class_init(ObjectClass *oc, void *data)
|
||||
|
|
|
@ -356,7 +356,6 @@ static void nrf51_nvm_reset(DeviceState *dev)
|
|||
|
||||
static const Property nrf51_nvm_properties[] = {
|
||||
DEFINE_PROP_UINT32("flash-size", NRF51NVMState, flash_size, 0x40000),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static const VMStateDescription vmstate_nvm = {
|
||||
|
|
|
@ -255,7 +255,6 @@ static const VMStateDescription vmstate_spapr_nvram = {
|
|||
static const Property spapr_nvram_properties[] = {
|
||||
DEFINE_SPAPR_PROPERTIES(SpaprNvram, sdev),
|
||||
DEFINE_PROP_DRIVE("drive", SpaprNvram, blk),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void spapr_nvram_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -523,7 +523,6 @@ static const VMStateDescription vmstate_bbram_ctrl = {
|
|||
static const Property bbram_ctrl_props[] = {
|
||||
DEFINE_PROP("drive", XlnxBBRam, blk, bbram_prop_drive, BlockBackend *),
|
||||
DEFINE_PROP_UINT32("crc-zpads", XlnxBBRam, crc_zpads, 1),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void bbram_ctrl_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -272,7 +272,6 @@ static const Property efuse_properties[] = {
|
|||
DEFINE_PROP_BOOL("init-factory-tbits", XlnxEFuse, init_tbits, true),
|
||||
DEFINE_PROP_ARRAY("read-only", XlnxEFuse, ro_bits_cnt, ro_bits,
|
||||
qdev_prop_uint32, uint32_t),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void efuse_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -87,8 +87,6 @@ static const Property efuse_cache_props[] = {
|
|||
DEFINE_PROP_LINK("efuse",
|
||||
XlnxVersalEFuseCache, efuse,
|
||||
TYPE_XLNX_EFUSE, XlnxEFuse *),
|
||||
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void efuse_cache_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -750,8 +750,6 @@ static const Property efuse_ctrl_props[] = {
|
|||
DEFINE_PROP_ARRAY("pg0-lock",
|
||||
XlnxVersalEFuseCtrl, extra_pg0_lock_n16,
|
||||
extra_pg0_lock_spec, qdev_prop_uint16, uint16_t),
|
||||
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void efuse_ctrl_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -837,8 +837,6 @@ static const Property zynqmp_efuse_props[] = {
|
|||
DEFINE_PROP_LINK("efuse",
|
||||
XlnxZynqMPEFuse, efuse,
|
||||
TYPE_XLNX_EFUSE, XlnxEFuse *),
|
||||
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void zynqmp_efuse_class_init(ObjectClass *klass, void *data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue