diff options
author | Cao jin <caoj.fnst@cn.fujitsu.com> | 2016-06-10 17:54:32 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-06-17 03:28:03 +0300 |
commit | 2cbb1a6826ee651ad2bef52cbcef1427b911def2 (patch) | |
tree | 82014fda45d6408629dab7da03e46cb65365515a /hw/pci | |
parent | 52ea63dea465575ccd71d52c3461b1b7d9f50ce0 (diff) | |
download | qemu-2cbb1a6826ee651ad2bef52cbcef1427b911def2.tar.gz qemu-2cbb1a6826ee651ad2bef52cbcef1427b911def2.tar.bz2 qemu-2cbb1a6826ee651ad2bef52cbcef1427b911def2.zip |
msi_init: change return value to 0 on success
No caller use its return value as msi capability offset, also in order
to make its return behaviour consistent with msix_init().
cc: Michael S. Tsirkin <mst@redhat.com>
cc: Paolo Bonzini <pbonzini@redhat.com>
cc: Hannes Reinecke <hare@suse.de>
cc: Markus Armbruster <armbru@redhat.com>
cc: Marcel Apfelbaum <marcel@redhat.com>
Acked-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci')
-rw-r--r-- | hw/pci/msi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/pci/msi.c b/hw/pci/msi.c index 359058e12c..ed792251dd 100644 --- a/hw/pci/msi.c +++ b/hw/pci/msi.c @@ -173,8 +173,7 @@ bool msi_enabled(const PCIDevice *dev) * If @msi64bit, make the device capable of sending a 64-bit message * address. * If @msi_per_vector_mask, make the device support per-vector masking. - * Return the offset of capability MSI in config space on success, - * return -errno on error. + * Return 0 on success, return -errno on error. * * -ENOTSUP means lacking msi support for a msi-capable platform. * -EINVAL means capability overlap, happens when @offset is non-zero, @@ -236,7 +235,8 @@ int msi_init(struct PCIDevice *dev, uint8_t offset, pci_set_long(dev->wmask + msi_mask_off(dev, msi64bit), 0xffffffff >> (PCI_MSI_VECTORS_MAX - nr_vectors)); } - return config_offset; + + return 0; } void msi_uninit(struct PCIDevice *dev) |