OSDN Git Service

pci: Don't register a specialized 'config_write' if default behavior is intended
authorShmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Tue, 16 Jun 2015 08:24:39 +0000 (11:24 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 19 Jun 2015 10:17:49 +0000 (12:17 +0200)
commit74de5504fd063019433ec0746105da774ede790d
tree9db5bf51507079300aa0a5f10bad08d32b6bc37f
parent5ba03e2dd785362026917e4cc8a1fd2c64e8e62c
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>
hw/misc/ivshmem.c
hw/net/vmxnet3.c
hw/scsi/megasas.c
hw/scsi/vmw_pvscsi.c