Mark remaining global TypeInfo instances as const

More than 1k of TypeInfo instances are already marked as const. Mark the
remaining ones, too.

This commit was created with:
  git grep -z -l 'static TypeInfo' -- '*.c' | \
  xargs -0 sed -i 's/static TypeInfo/static const TypeInfo/'

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Message-id: 20220117145805.173070-2-shentey@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Bernhard Beschow 2022-01-17 15:58:04 +01:00 committed by Peter Maydell
parent 7f6c295cdf
commit 5e78c98b7c
39 changed files with 42 additions and 42 deletions

View File

@ -207,7 +207,7 @@ static void generic_loader_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_MISC, dc->categories); set_bit(DEVICE_CATEGORY_MISC, dc->categories);
} }
static TypeInfo generic_loader_info = { static const TypeInfo generic_loader_info = {
.name = TYPE_GENERIC_LOADER, .name = TYPE_GENERIC_LOADER,
.parent = TYPE_DEVICE, .parent = TYPE_DEVICE,
.instance_size = sizeof(GenericLoaderState), .instance_size = sizeof(GenericLoaderState),

View File

@ -129,7 +129,7 @@ static void guest_loader_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_MISC, dc->categories); set_bit(DEVICE_CATEGORY_MISC, dc->categories);
} }
static TypeInfo guest_loader_info = { static const TypeInfo guest_loader_info = {
.name = TYPE_GUEST_LOADER, .name = TYPE_GUEST_LOADER,
.parent = TYPE_DEVICE, .parent = TYPE_DEVICE,
.instance_size = sizeof(GuestLoaderState), .instance_size = sizeof(GuestLoaderState),

View File

@ -454,7 +454,7 @@ static void bcm2835_fb_class_init(ObjectClass *klass, void *data)
dc->vmsd = &vmstate_bcm2835_fb; dc->vmsd = &vmstate_bcm2835_fb;
} }
static TypeInfo bcm2835_fb_info = { static const TypeInfo bcm2835_fb_info = {
.name = TYPE_BCM2835_FB, .name = TYPE_BCM2835_FB,
.parent = TYPE_SYS_BUS_DEVICE, .parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(BCM2835FBState), .instance_size = sizeof(BCM2835FBState),

View File

@ -113,7 +113,7 @@ static void i2c_ddc_class_init(ObjectClass *oc, void *data)
isc->send = i2c_ddc_tx; isc->send = i2c_ddc_tx;
} }
static TypeInfo i2c_ddc_info = { static const TypeInfo i2c_ddc_info = {
.name = TYPE_I2CDDC, .name = TYPE_I2CDDC,
.parent = TYPE_I2C_SLAVE, .parent = TYPE_I2C_SLAVE,
.instance_size = sizeof(I2CDDCState), .instance_size = sizeof(I2CDDCState),

View File

@ -782,14 +782,14 @@ static void macfb_nubus_class_init(ObjectClass *klass, void *data)
device_class_set_props(dc, macfb_nubus_properties); device_class_set_props(dc, macfb_nubus_properties);
} }
static TypeInfo macfb_sysbus_info = { static const TypeInfo macfb_sysbus_info = {
.name = TYPE_MACFB, .name = TYPE_MACFB,
.parent = TYPE_SYS_BUS_DEVICE, .parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(MacfbSysBusState), .instance_size = sizeof(MacfbSysBusState),
.class_init = macfb_sysbus_class_init, .class_init = macfb_sysbus_class_init,
}; };
static TypeInfo macfb_nubus_info = { static const TypeInfo macfb_nubus_info = {
.name = TYPE_NUBUS_MACFB, .name = TYPE_NUBUS_MACFB,
.parent = TYPE_NUBUS_DEVICE, .parent = TYPE_NUBUS_DEVICE,
.instance_size = sizeof(MacfbNubusState), .instance_size = sizeof(MacfbNubusState),

View File

@ -220,7 +220,7 @@ static void virtio_vga_base_class_init(ObjectClass *klass, void *data)
virtio_vga_set_big_endian_fb); virtio_vga_set_big_endian_fb);
} }
static TypeInfo virtio_vga_base_info = { static const TypeInfo virtio_vga_base_info = {
.name = TYPE_VIRTIO_VGA_BASE, .name = TYPE_VIRTIO_VGA_BASE,
.parent = TYPE_VIRTIO_PCI, .parent = TYPE_VIRTIO_PCI,
.instance_size = sizeof(VirtIOVGABase), .instance_size = sizeof(VirtIOVGABase),

View File

@ -394,7 +394,7 @@ static void bcm2835_dma_class_init(ObjectClass *klass, void *data)
dc->vmsd = &vmstate_bcm2835_dma; dc->vmsd = &vmstate_bcm2835_dma;
} }
static TypeInfo bcm2835_dma_info = { static const TypeInfo bcm2835_dma_info = {
.name = TYPE_BCM2835_DMA, .name = TYPE_BCM2835_DMA,
.parent = TYPE_SYS_BUS_DEVICE, .parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(BCM2835DMAState), .instance_size = sizeof(BCM2835DMAState),

View File

@ -867,7 +867,7 @@ static void isa_bridge_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_BRIDGE_ISA; k->class_id = PCI_CLASS_BRIDGE_ISA;
}; };
static TypeInfo isa_bridge_info = { static const TypeInfo isa_bridge_info = {
.name = "igd-passthrough-isa-bridge", .name = "igd-passthrough-isa-bridge",
.parent = TYPE_PCI_DEVICE, .parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(PCIDevice), .instance_size = sizeof(PCIDevice),

View File

@ -167,7 +167,7 @@ static void sgx_epc_class_init(ObjectClass *oc, void *data)
mdc->fill_device_info = sgx_epc_md_fill_device_info; mdc->fill_device_info = sgx_epc_md_fill_device_info;
} }
static TypeInfo sgx_epc_info = { static const TypeInfo sgx_epc_info = {
.name = TYPE_SGX_EPC, .name = TYPE_SGX_EPC,
.parent = TYPE_DEVICE, .parent = TYPE_DEVICE,
.instance_size = sizeof(SGXEPCDevice), .instance_size = sizeof(SGXEPCDevice),

View File

@ -227,7 +227,7 @@ static void bcm2835_ic_class_init(ObjectClass *klass, void *data)
dc->vmsd = &vmstate_bcm2835_ic; dc->vmsd = &vmstate_bcm2835_ic;
} }
static TypeInfo bcm2835_ic_info = { static const TypeInfo bcm2835_ic_info = {
.name = TYPE_BCM2835_IC, .name = TYPE_BCM2835_IC,
.parent = TYPE_SYS_BUS_DEVICE, .parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(BCM2835ICState), .instance_size = sizeof(BCM2835ICState),

View File

@ -392,7 +392,7 @@ static void bcm2836_control_class_init(ObjectClass *klass, void *data)
dc->vmsd = &vmstate_bcm2836_control; dc->vmsd = &vmstate_bcm2836_control;
} }
static TypeInfo bcm2836_control_info = { static const TypeInfo bcm2836_control_info = {
.name = TYPE_BCM2836_CONTROL, .name = TYPE_BCM2836_CONTROL,
.parent = TYPE_SYS_BUS_DEVICE, .parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(BCM2836ControlState), .instance_size = sizeof(BCM2836ControlState),

View File

@ -85,7 +85,7 @@ static void ipmi_interface_class_init(ObjectClass *class, void *data)
ik->do_hw_op = ipmi_do_hw_op; ik->do_hw_op = ipmi_do_hw_op;
} }
static TypeInfo ipmi_interface_type_info = { static const TypeInfo ipmi_interface_type_info = {
.name = TYPE_IPMI_INTERFACE, .name = TYPE_IPMI_INTERFACE,
.parent = TYPE_INTERFACE, .parent = TYPE_INTERFACE,
.class_size = sizeof(IPMIInterfaceClass), .class_size = sizeof(IPMIInterfaceClass),
@ -120,7 +120,7 @@ static void bmc_class_init(ObjectClass *oc, void *data)
device_class_set_props(dc, ipmi_bmc_properties); device_class_set_props(dc, ipmi_bmc_properties);
} }
static TypeInfo ipmi_bmc_type_info = { static const TypeInfo ipmi_bmc_type_info = {
.name = TYPE_IPMI_BMC, .name = TYPE_IPMI_BMC,
.parent = TYPE_DEVICE, .parent = TYPE_DEVICE,
.instance_size = sizeof(IPMIBmc), .instance_size = sizeof(IPMIBmc),

View File

@ -264,7 +264,7 @@ static void nvdimm_class_init(ObjectClass *oc, void *data)
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
} }
static TypeInfo nvdimm_info = { static const TypeInfo nvdimm_info = {
.name = TYPE_NVDIMM, .name = TYPE_NVDIMM,
.parent = TYPE_PC_DIMM, .parent = TYPE_PC_DIMM,
.class_size = sizeof(NVDIMMClass), .class_size = sizeof(NVDIMMClass),

View File

@ -291,7 +291,7 @@ static void pc_dimm_class_init(ObjectClass *oc, void *data)
mdc->fill_device_info = pc_dimm_md_fill_device_info; mdc->fill_device_info = pc_dimm_md_fill_device_info;
} }
static TypeInfo pc_dimm_info = { static const TypeInfo pc_dimm_info = {
.name = TYPE_PC_DIMM, .name = TYPE_PC_DIMM,
.parent = TYPE_DEVICE, .parent = TYPE_DEVICE,
.instance_size = sizeof(PCDIMMDevice), .instance_size = sizeof(PCDIMMDevice),

View File

@ -323,7 +323,7 @@ static void bcm2835_mbox_class_init(ObjectClass *klass, void *data)
dc->vmsd = &vmstate_bcm2835_mbox; dc->vmsd = &vmstate_bcm2835_mbox;
} }
static TypeInfo bcm2835_mbox_info = { static const TypeInfo bcm2835_mbox_info = {
.name = TYPE_BCM2835_MBOX, .name = TYPE_BCM2835_MBOX,
.parent = TYPE_SYS_BUS_DEVICE, .parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(BCM2835MboxState), .instance_size = sizeof(BCM2835MboxState),

View File

@ -144,7 +144,7 @@ static void bcm2835_powermgt_class_init(ObjectClass *klass, void *data)
dc->vmsd = &vmstate_bcm2835_powermgt; dc->vmsd = &vmstate_bcm2835_powermgt;
} }
static TypeInfo bcm2835_powermgt_info = { static const TypeInfo bcm2835_powermgt_info = {
.name = TYPE_BCM2835_POWERMGT, .name = TYPE_BCM2835_POWERMGT,
.parent = TYPE_SYS_BUS_DEVICE, .parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(BCM2835PowerMgtState), .instance_size = sizeof(BCM2835PowerMgtState),

View File

@ -421,7 +421,7 @@ static void bcm2835_property_class_init(ObjectClass *klass, void *data)
dc->vmsd = &vmstate_bcm2835_property; dc->vmsd = &vmstate_bcm2835_property;
} }
static TypeInfo bcm2835_property_info = { static const TypeInfo bcm2835_property_info = {
.name = TYPE_BCM2835_PROPERTY, .name = TYPE_BCM2835_PROPERTY,
.parent = TYPE_SYS_BUS_DEVICE, .parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(BCM2835PropertyState), .instance_size = sizeof(BCM2835PropertyState),

View File

@ -131,7 +131,7 @@ static void bcm2835_rng_class_init(ObjectClass *klass, void *data)
dc->vmsd = &vmstate_bcm2835_rng; dc->vmsd = &vmstate_bcm2835_rng;
} }
static TypeInfo bcm2835_rng_info = { static const TypeInfo bcm2835_rng_info = {
.name = TYPE_BCM2835_RNG, .name = TYPE_BCM2835_RNG,
.parent = TYPE_SYS_BUS_DEVICE, .parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(BCM2835RngState), .instance_size = sizeof(BCM2835RngState),

View File

@ -77,7 +77,7 @@ static void pvpanic_isa_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_MISC, dc->categories); set_bit(DEVICE_CATEGORY_MISC, dc->categories);
} }
static TypeInfo pvpanic_isa_info = { static const TypeInfo pvpanic_isa_info = {
.name = TYPE_PVPANIC_ISA_DEVICE, .name = TYPE_PVPANIC_ISA_DEVICE,
.parent = TYPE_ISA_DEVICE, .parent = TYPE_ISA_DEVICE,
.instance_size = sizeof(PVPanicISAState), .instance_size = sizeof(PVPanicISAState),

View File

@ -74,7 +74,7 @@ static void pvpanic_pci_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_MISC, dc->categories); set_bit(DEVICE_CATEGORY_MISC, dc->categories);
} }
static TypeInfo pvpanic_pci_info = { static const TypeInfo pvpanic_pci_info = {
.name = TYPE_PVPANIC_PCI_DEVICE, .name = TYPE_PVPANIC_PCI_DEVICE,
.parent = TYPE_PCI_DEVICE, .parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(PVPanicPCIState), .instance_size = sizeof(PVPanicPCIState),

View File

@ -430,7 +430,7 @@ static void etsec_class_init(ObjectClass *klass, void *data)
dc->user_creatable = true; dc->user_creatable = true;
} }
static TypeInfo etsec_info = { static const TypeInfo etsec_info = {
.name = TYPE_ETSEC_COMMON, .name = TYPE_ETSEC_COMMON,
.parent = TYPE_SYS_BUS_DEVICE, .parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(eTSEC), .instance_size = sizeof(eTSEC),

View File

@ -300,7 +300,7 @@ static void prep_systemio_class_initfn(ObjectClass *klass, void *data)
device_class_set_props(dc, prep_systemio_properties); device_class_set_props(dc, prep_systemio_properties);
} }
static TypeInfo prep_systemio800_info = { static const TypeInfo prep_systemio800_info = {
.name = TYPE_PREP_SYSTEMIO, .name = TYPE_PREP_SYSTEMIO,
.parent = TYPE_ISA_DEVICE, .parent = TYPE_ISA_DEVICE,
.instance_size = sizeof(PrepSystemIoState), .instance_size = sizeof(PrepSystemIoState),

View File

@ -685,7 +685,7 @@ static void spapr_tce_table_class_init(ObjectClass *klass, void *data)
spapr_register_hypercall(H_STUFF_TCE, h_stuff_tce); spapr_register_hypercall(H_STUFF_TCE, h_stuff_tce);
} }
static TypeInfo spapr_tce_table_info = { static const TypeInfo spapr_tce_table_info = {
.name = TYPE_SPAPR_TCE_TABLE, .name = TYPE_SPAPR_TCE_TABLE,
.parent = TYPE_DEVICE, .parent = TYPE_DEVICE,
.instance_size = sizeof(SpaprTceTable), .instance_size = sizeof(SpaprTceTable),

View File

@ -1392,7 +1392,7 @@ static const TypeInfo s390_pci_device_info = {
.class_init = s390_pci_device_class_init, .class_init = s390_pci_device_class_init,
}; };
static TypeInfo s390_pci_iommu_info = { static const TypeInfo s390_pci_iommu_info = {
.name = TYPE_S390_PCI_IOMMU, .name = TYPE_S390_PCI_IOMMU,
.parent = TYPE_OBJECT, .parent = TYPE_OBJECT,
.instance_size = sizeof(S390PCIIOMMU), .instance_size = sizeof(S390PCIIOMMU),

View File

@ -460,7 +460,7 @@ static void sclp_class_init(ObjectClass *oc, void *data)
sc->service_interrupt = service_interrupt; sc->service_interrupt = service_interrupt;
} }
static TypeInfo sclp_info = { static const TypeInfo sclp_info = {
.name = TYPE_SCLP, .name = TYPE_SCLP,
.parent = TYPE_DEVICE, .parent = TYPE_DEVICE,
.instance_init = sclp_init, .instance_init = sclp_init,

View File

@ -147,7 +147,7 @@ static void kvm_s390_tod_init(Object *obj)
td->stopped = false; td->stopped = false;
} }
static TypeInfo kvm_s390_tod_info = { static const TypeInfo kvm_s390_tod_info = {
.name = TYPE_KVM_S390_TOD, .name = TYPE_KVM_S390_TOD,
.parent = TYPE_S390_TOD, .parent = TYPE_S390_TOD,
.instance_size = sizeof(S390TODState), .instance_size = sizeof(S390TODState),

View File

@ -73,7 +73,7 @@ static void qemu_s390_tod_init(Object *obj)
} }
} }
static TypeInfo qemu_s390_tod_info = { static const TypeInfo qemu_s390_tod_info = {
.name = TYPE_QEMU_S390_TOD, .name = TYPE_QEMU_S390_TOD,
.parent = TYPE_S390_TOD, .parent = TYPE_S390_TOD,
.instance_size = sizeof(S390TODState), .instance_size = sizeof(S390TODState),

View File

@ -123,7 +123,7 @@ static void s390_tod_class_init(ObjectClass *oc, void *data)
dc->user_creatable = false; dc->user_creatable = false;
} }
static TypeInfo s390_tod_info = { static const TypeInfo s390_tod_info = {
.name = TYPE_S390_TOD, .name = TYPE_S390_TOD,
.parent = TYPE_DEVICE, .parent = TYPE_DEVICE,
.instance_size = sizeof(S390TODState), .instance_size = sizeof(S390TODState),

View File

@ -2352,7 +2352,7 @@ static void lsi53c810_class_init(ObjectClass *klass, void *data)
k->device_id = PCI_DEVICE_ID_LSI_53C810; k->device_id = PCI_DEVICE_ID_LSI_53C810;
} }
static TypeInfo lsi53c810_info = { static const TypeInfo lsi53c810_info = {
.name = TYPE_LSI53C810, .name = TYPE_LSI53C810,
.parent = TYPE_LSI53C895A, .parent = TYPE_LSI53C895A,
.class_init = lsi53c810_class_init, .class_init = lsi53c810_class_init,

View File

@ -835,7 +835,7 @@ static void allwinner_sdhost_sun5i_class_init(ObjectClass *klass, void *data)
sc->max_desc_size = 64 * KiB; sc->max_desc_size = 64 * KiB;
} }
static TypeInfo allwinner_sdhost_info = { static const TypeInfo allwinner_sdhost_info = {
.name = TYPE_AW_SDHOST, .name = TYPE_AW_SDHOST,
.parent = TYPE_SYS_BUS_DEVICE, .parent = TYPE_SYS_BUS_DEVICE,
.instance_init = allwinner_sdhost_init, .instance_init = allwinner_sdhost_init,

View File

@ -198,7 +198,7 @@ static void aspeed_sdhci_class_init(ObjectClass *classp, void *data)
device_class_set_props(dc, aspeed_sdhci_properties); device_class_set_props(dc, aspeed_sdhci_properties);
} }
static TypeInfo aspeed_sdhci_info = { static const TypeInfo aspeed_sdhci_info = {
.name = TYPE_ASPEED_SDHCI, .name = TYPE_ASPEED_SDHCI,
.parent = TYPE_SYS_BUS_DEVICE, .parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(AspeedSDHCIState), .instance_size = sizeof(AspeedSDHCIState),

View File

@ -436,7 +436,7 @@ static void bcm2835_sdhost_class_init(ObjectClass *klass, void *data)
dc->vmsd = &vmstate_bcm2835_sdhost; dc->vmsd = &vmstate_bcm2835_sdhost;
} }
static TypeInfo bcm2835_sdhost_info = { static const TypeInfo bcm2835_sdhost_info = {
.name = TYPE_BCM2835_SDHOST, .name = TYPE_BCM2835_SDHOST,
.parent = TYPE_SYS_BUS_DEVICE, .parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(BCM2835SDHostState), .instance_size = sizeof(BCM2835SDHostState),

View File

@ -175,7 +175,7 @@ static void cadence_sdhci_class_init(ObjectClass *classp, void *data)
dc->vmsd = &vmstate_cadence_sdhci; dc->vmsd = &vmstate_cadence_sdhci;
} }
static TypeInfo cadence_sdhci_info = { static const TypeInfo cadence_sdhci_info = {
.name = TYPE_CADENCE_SDHCI, .name = TYPE_CADENCE_SDHCI,
.parent = TYPE_SYS_BUS_DEVICE, .parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(CadenceSDHCIState), .instance_size = sizeof(CadenceSDHCIState),

View File

@ -166,7 +166,7 @@ static void npcm7xx_sdhci_instance_init(Object *obj)
TYPE_SYSBUS_SDHCI); TYPE_SYSBUS_SDHCI);
} }
static TypeInfo npcm7xx_sdhci_info = { static const TypeInfo npcm7xx_sdhci_info = {
.name = TYPE_NPCM7XX_SDHCI, .name = TYPE_NPCM7XX_SDHCI,
.parent = TYPE_SYS_BUS_DEVICE, .parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(NPCM7xxSDHCIState), .instance_size = sizeof(NPCM7xxSDHCIState),

View File

@ -2106,7 +2106,7 @@ static void usb_mtp_class_initfn(ObjectClass *klass, void *data)
device_class_set_props(dc, mtp_properties); device_class_set_props(dc, mtp_properties);
} }
static TypeInfo mtp_info = { static const TypeInfo mtp_info = {
.name = TYPE_USB_MTP, .name = TYPE_USB_MTP,
.parent = TYPE_USB_DEVICE, .parent = TYPE_USB_DEVICE,
.instance_size = sizeof(MTPState), .instance_size = sizeof(MTPState),

View File

@ -1801,7 +1801,7 @@ static void usb_host_class_initfn(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
} }
static TypeInfo usb_host_dev_info = { static const TypeInfo usb_host_dev_info = {
.name = TYPE_USB_HOST_DEVICE, .name = TYPE_USB_HOST_DEVICE,
.parent = TYPE_USB_DEVICE, .parent = TYPE_USB_DEVICE,
.instance_size = sizeof(USBHostDevice), .instance_size = sizeof(USBHostDevice),

View File

@ -199,7 +199,7 @@ static void vfio_pci_igd_lpc_bridge_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_BRIDGE_ISA; k->class_id = PCI_CLASS_BRIDGE_ISA;
} }
static TypeInfo vfio_pci_igd_lpc_bridge_info = { static const TypeInfo vfio_pci_igd_lpc_bridge_info = {
.name = "vfio-pci-igd-lpc-bridge", .name = "vfio-pci-igd-lpc-bridge",
.parent = TYPE_PCI_DEVICE, .parent = TYPE_PCI_DEVICE,
.class_init = vfio_pci_igd_lpc_bridge_class_init, .class_init = vfio_pci_igd_lpc_bridge_class_init,

View File

@ -182,7 +182,7 @@ static void virtio_pmem_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
} }
static TypeInfo virtio_pmem_info = { static const TypeInfo virtio_pmem_info = {
.name = TYPE_VIRTIO_PMEM, .name = TYPE_VIRTIO_PMEM,
.parent = TYPE_VIRTIO_DEVICE, .parent = TYPE_VIRTIO_DEVICE,
.class_size = sizeof(VirtIOPMEMClass), .class_size = sizeof(VirtIOPMEMClass),

View File

@ -2793,13 +2793,13 @@ static void object_class_init(ObjectClass *klass, void *data)
static void register_types(void) static void register_types(void)
{ {
static TypeInfo interface_info = { static const TypeInfo interface_info = {
.name = TYPE_INTERFACE, .name = TYPE_INTERFACE,
.class_size = sizeof(InterfaceClass), .class_size = sizeof(InterfaceClass),
.abstract = true, .abstract = true,
}; };
static TypeInfo object_info = { static const TypeInfo object_info = {
.name = TYPE_OBJECT, .name = TYPE_OBJECT,
.instance_size = sizeof(Object), .instance_size = sizeof(Object),
.class_init = object_class_init, .class_init = object_class_init,