[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 05/21] pci: Add comment for pci_add_capability2()
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 05/21] pci: Add comment for pci_add_capability2() |
Date: |
Mon, 3 Jul 2017 22:44:45 +0300 |
From: Mao Zhongyi <address@hidden>
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
Signed-off-by: Mao Zhongyi <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <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 3c24888..3370b76 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)
--
MST
- [Qemu-devel] [PULL 00/21] pc, acpi, pci, virtio: fixes, cleanups, features, tests, Michael S. Tsirkin, 2017/07/03
- [Qemu-devel] [PULL 01/21] virtio-net: enable configurable tx queue size, Michael S. Tsirkin, 2017/07/03
- [Qemu-devel] [PULL 02/21] hw/pci-bridge/dec: Classify the DEC PCI bridge as bridge device, Michael S. Tsirkin, 2017/07/03
- [Qemu-devel] [PULL 03/21] intel_iommu: relax iq tail check on VTD_GCMD_QIE enable, Michael S. Tsirkin, 2017/07/03
- [Qemu-devel] [PULL 04/21] pci: Clean up error checking in pci_add_capability(), Michael S. Tsirkin, 2017/07/03
- [Qemu-devel] [PULL 05/21] pci: Add comment for pci_add_capability2(),
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 06/21] pci: Fix the wrong assertion., Michael S. Tsirkin, 2017/07/03
- [Qemu-devel] [PULL 07/21] pci: Make errp the last parameter of pci_add_capability(), Michael S. Tsirkin, 2017/07/03
- [Qemu-devel] [PULL 08/21] pci: Replace pci_add_capability2() with pci_add_capability(), Michael S. Tsirkin, 2017/07/03
- [Qemu-devel] [PULL 09/21] pci: Convert to realize, Michael S. Tsirkin, 2017/07/03
- [Qemu-devel] [PULL 10/21] pci: Convert shpc_init() to Error, Michael S. Tsirkin, 2017/07/03
- [Qemu-devel] [PULL 11/21] i386/kvm/pci-assign: Fix return type of verify_irqchip_kernel(), Michael S. Tsirkin, 2017/07/03
- [Qemu-devel] [PULL 12/21] i386/kvm/pci-assign: Use errp directly rather than local_err, Michael S. Tsirkin, 2017/07/03
- [Qemu-devel] [PULL 15/21] hw/acpi: remove dead acpi code, Michael S. Tsirkin, 2017/07/03
- [Qemu-devel] [PULL 14/21] fw_cfg: move setting of FW_CFG_VERSION_DMA bit to fw_cfg_init1(), Michael S. Tsirkin, 2017/07/03
- [Qemu-devel] [PULL 13/21] fw_cfg: don't map the fw_cfg IO ports in fw_cfg_io_realize(), Michael S. Tsirkin, 2017/07/03