hw/nvram: Constify all Property

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2024-12-13 16:31:56 +00:00
parent b32c22bf31
commit 2839136833
11 changed files with 13 additions and 13 deletions

View file

@ -142,7 +142,7 @@ static void nvram_sysbus_realize(DeviceState *dev, Error **errp)
nvram_post_load(s, 0);
}
static Property nvram_sysbus_properties[] = {
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(),

View file

@ -234,7 +234,7 @@ void at24c_eeprom_reset(DeviceState *state)
ee->haveaddr = 0;
}
static Property at24c_eeprom_props[] = {
static const Property at24c_eeprom_props[] = {
DEFINE_PROP_UINT32("rom-size", EEPROMState, rsize, 0),
DEFINE_PROP_UINT8("address-size", EEPROMState, asize, 0),
DEFINE_PROP_BOOL("writable", EEPROMState, writable, true),

View file

@ -1082,7 +1082,7 @@ static void fw_cfg_machine_ready(struct Notifier *n, void *data)
qemu_register_reset(fw_cfg_machine_reset, s);
}
static Property fw_cfg_properties[] = {
static const Property fw_cfg_properties[] = {
DEFINE_PROP_BOOL("acpi-mr-restore", FWCfgState, acpi_mr_restore, true),
DEFINE_PROP_END_OF_LIST(),
};
@ -1273,7 +1273,7 @@ static void fw_cfg_file_slots_allocate(FWCfgState *s, Error **errp)
s->entry_order = g_new0(int, fw_cfg_max_entry(s));
}
static Property fw_cfg_io_properties[] = {
static const Property fw_cfg_io_properties[] = {
DEFINE_PROP_BOOL("dma_enabled", FWCfgIoState, parent_obj.dma_enabled,
true),
DEFINE_PROP_UINT16("x-file-slots", FWCfgIoState, parent_obj.file_slots,
@ -1322,7 +1322,7 @@ static const TypeInfo fw_cfg_io_info = {
};
static Property fw_cfg_mem_properties[] = {
static const Property fw_cfg_mem_properties[] = {
DEFINE_PROP_UINT32("data_width", FWCfgMemState, data_width, -1),
DEFINE_PROP_BOOL("dma_enabled", FWCfgMemState, parent_obj.dma_enabled,
true),

View file

@ -134,7 +134,7 @@ static void macio_nvram_unrealizefn(DeviceState *dev)
g_free(s->data);
}
static Property macio_nvram_properties[] = {
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),

View file

@ -354,7 +354,7 @@ static void nrf51_nvm_reset(DeviceState *dev)
memset(s->uicr_content, 0xFF, sizeof(s->uicr_content));
}
static Property nrf51_nvm_properties[] = {
static const Property nrf51_nvm_properties[] = {
DEFINE_PROP_UINT32("flash-size", NRF51NVMState, flash_size, 0x40000),
DEFINE_PROP_END_OF_LIST(),
};

View file

@ -252,7 +252,7 @@ static const VMStateDescription vmstate_spapr_nvram = {
},
};
static Property spapr_nvram_properties[] = {
static const Property spapr_nvram_properties[] = {
DEFINE_SPAPR_PROPERTIES(SpaprNvram, sdev),
DEFINE_PROP_DRIVE("drive", SpaprNvram, blk),
DEFINE_PROP_END_OF_LIST(),

View file

@ -520,7 +520,7 @@ static const VMStateDescription vmstate_bbram_ctrl = {
}
};
static Property bbram_ctrl_props[] = {
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(),

View file

@ -265,7 +265,7 @@ static const PropertyInfo efuse_prop_drive = {
.release = efuse_prop_release_drive,
};
static Property efuse_properties[] = {
static const Property efuse_properties[] = {
DEFINE_PROP("drive", XlnxEFuse, blk, efuse_prop_drive, BlockBackend *),
DEFINE_PROP_UINT8("efuse-nr", XlnxEFuse, efuse_nr, 3),
DEFINE_PROP_UINT32("efuse-size", XlnxEFuse, efuse_size, 64 * 32),

View file

@ -83,7 +83,7 @@ static void efuse_cache_init(Object *obj)
sysbus_init_mmio(sbd, &s->iomem);
}
static Property efuse_cache_props[] = {
static const Property efuse_cache_props[] = {
DEFINE_PROP_LINK("efuse",
XlnxVersalEFuseCache, efuse,
TYPE_XLNX_EFUSE, XlnxEFuse *),

View file

@ -743,7 +743,7 @@ static const VMStateDescription vmstate_efuse_ctrl = {
}
};
static Property efuse_ctrl_props[] = {
static const Property efuse_ctrl_props[] = {
DEFINE_PROP_LINK("efuse",
XlnxVersalEFuseCtrl, efuse,
TYPE_XLNX_EFUSE, XlnxEFuse *),

View file

@ -833,7 +833,7 @@ static const VMStateDescription vmstate_efuse = {
}
};
static Property zynqmp_efuse_props[] = {
static const Property zynqmp_efuse_props[] = {
DEFINE_PROP_LINK("efuse",
XlnxZynqMPEFuse, efuse,
TYPE_XLNX_EFUSE, XlnxEFuse *),