[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 2/6] pci: Add comment for pci_add_capability2()
From: |
Mao Zhongyi |
Subject: |
[Qemu-devel] [PATCH v2 2/6] pci: Add comment for pci_add_capability2() |
Date: |
Fri, 2 Jun 2017 15:54:38 +0800 |
Add a comment 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 | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 53566b8..9810d5f 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2276,6 +2276,10 @@ int pci_add_capability(PCIDevice *pdev, uint8_t cap_id,
return ret;
}
+/*
+ * On success, pci_add_capability2() returns a positive value.
+ * On failure, it sets an error and returns a negative value.
+ */
int pci_add_capability2(PCIDevice *pdev, uint8_t cap_id,
uint8_t offset, uint8_t size,
Error **errp)
--
2.9.3
- Re: [Qemu-devel] [PATCH v2 1/6] pci: Clean up error checking in pci_add_capability(), (continued)
[Qemu-devel] [PATCH v2 3/6] pci: Fix the wrong return value judgment condition, Mao Zhongyi, 2017/06/02
[Qemu-devel] [PATCH v2 5/6] pci: Make errp the last parameter of pci_add_capability(), Mao Zhongyi, 2017/06/02
[Qemu-devel] [PATCH v2 2/6] pci: Add comment for pci_add_capability2(),
Mao Zhongyi <=
[Qemu-devel] [PATCH v2 6/6] pci: Convert to realize, Mao Zhongyi, 2017/06/02
[Qemu-devel] [PATCH v2 4/6] net/eepro100: Fixed code style, Mao Zhongyi, 2017/06/02
Re: [Qemu-devel] [PATCH v2 0/6] Convert to realize and cleanup, Michael S. Tsirkin, 2017/06/06