qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 2/9] pci: Add comment for pci_add_capability2


From: Marcel Apfelbaum
Subject: Re: [Qemu-devel] [PATCH v5 2/9] pci: Add comment for pci_add_capability2()
Date: Mon, 19 Jun 2017 13:13:13 +0300
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

On 12/06/2017 16:48, Mao Zhongyi wrote:
Comments for pci_add_capability2() to explain the return
value. This may help to make a correct return value check
for its callers.

Cc: address@hidden
Cc: address@hidden
Cc: address@hidden
Suggested-by: Markus Armbruster <address@hidden>
Signed-off-by: Mao Zhongyi <address@hidden>
---
  hw/pci/pci.c | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 53566b8..b73bfea 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2276,6 +2276,12 @@ int pci_add_capability(PCIDevice *pdev, uint8_t cap_id,
      return ret;
  }
+/*
+ * On success, pci_add_capability2() returns a positive value
+ * that the offset of the pci capability.
+ * On failure, it sets an error and returns a negative error
+ * code.
+ */
  int pci_add_capability2(PCIDevice *pdev, uint8_t cap_id,
                         uint8_t offset, uint8_t size,
                         Error **errp)


Reviewed-by: Marcel Apfelbaum <address@hidden>

Thanks,
Marcel



reply via email to

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