[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v8 11/17] msi_init: change return value to 0 on

From: Marcel Apfelbaum
Subject: Re: [Qemu-devel] [PATCH v8 11/17] msi_init: change return value to 0 on success
Date: Mon, 13 Jun 2016 12:38:26 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

On 06/10/2016 12:54 PM, Cao jin wrote:
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 <address@hidden>
cc: Paolo Bonzini <address@hidden>
cc: Hannes Reinecke <address@hidden>
cc: Markus Armbruster <address@hidden>
cc: Marcel Apfelbaum <address@hidden>

Acked-by: Hannes Reinecke <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Cao jin <address@hidden>
  hw/pci/msi.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

Hi Hannes,
    This version changed, If is ok with you, I will let your A-b still here.

diff --git a/hw/pci/msi.c b/hw/pci/msi.c
index 359058e..ed79225 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)

Reviewed-by: Marcel Apfelbaum <address@hidden>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]