]> Git Repo - qemu.git/commitdiff
pci: Add comment for pci_add_capability2()
authorMao Zhongyi <[email protected]>
Tue, 27 Jun 2017 06:16:48 +0000 (14:16 +0800)
committerMichael S. Tsirkin <[email protected]>
Mon, 3 Jul 2017 19:29:48 +0000 (22:29 +0300)
Comments for pci_add_capability2() to explain the return
value. This may help to make a correct return value check
for its callers.

Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Mao Zhongyi <[email protected]>
Reviewed-by: Marcel Apfelbaum <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
hw/pci/pci.c

index 3c24888870959997329e8d5c2effc6d01960f6d5..3370b76164123bf35246d09eadd68a2e3f9af71f 100644 (file)
@@ -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)
This page took 0.02806 seconds and 4 git commands to generate.