From 74de5504fd063019433ec0746105da774ede790d Mon Sep 17 00:00:00 2001 From: Shmulik Ladkani Date: Tue, 16 Jun 2015 11:24:39 +0300 Subject: 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 Signed-off-by: Shmulik Ladkani Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/misc/ivshmem.c | 1 - 1 file changed, 1 deletion(-) (limited to 'hw/misc/ivshmem.c') diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 5d272c84e9..231c35fdef 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -698,7 +698,6 @@ static void ivshmem_write_config(PCIDevice *pci_dev, uint32_t address, uint32_t val, int len) { pci_default_write_config(pci_dev, address, val, len); - msix_write_config(pci_dev, address, val, len); } static int pci_ivshmem_init(PCIDevice *dev) -- cgit v1.2.3-55-g7522