mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
pci: Don't register a specialized 'config_write' if default behavior is intended
Few devices have their specialized 'config_write' methods which simply call 'pci_default_write_config' followed by a 'msix_write_config' or 'msi_write_config' calls, using exact same arguments. This is unnecessary as 'pci_default_write_config' already invokes 'msi_write_config' and 'msix_write_config'. Also, since 'pci_default_write_config' is the default 'config_write' handler, we can simply avoid the registration of these specialized versions. Cc: Leonid Shatz <leonid.shatz@ravellosystems.com> Signed-off-by: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
5ba03e2dd7
commit
74de5504fd
4 changed files with 0 additions and 26 deletions
|
@ -1174,13 +1174,6 @@ static const VMStateDescription vmstate_pvscsi = {
|
|||
}
|
||||
};
|
||||
|
||||
static void
|
||||
pvscsi_write_config(PCIDevice *pci, uint32_t addr, uint32_t val, int len)
|
||||
{
|
||||
pci_default_write_config(pci, addr, val, len);
|
||||
msi_write_config(pci, addr, val, len);
|
||||
}
|
||||
|
||||
static Property pvscsi_properties[] = {
|
||||
DEFINE_PROP_UINT8("use_msg", PVSCSIState, use_msg, 1),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
|
@ -1202,7 +1195,6 @@ static void pvscsi_class_init(ObjectClass *klass, void *data)
|
|||
dc->vmsd = &vmstate_pvscsi;
|
||||
dc->props = pvscsi_properties;
|
||||
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
|
||||
k->config_write = pvscsi_write_config;
|
||||
hc->unplug = pvscsi_hot_unplug;
|
||||
hc->plug = pvscsi_hotplug;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue