[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 15/17] hw/vfio/pci: Omit errp for pci_add_capability
From: |
Akihiko Odaki |
Subject: |
[PATCH v2 15/17] hw/vfio/pci: Omit errp for pci_add_capability |
Date: |
Sat, 22 Oct 2022 13:40:51 +0900 |
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
hw/vfio/pci.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 939dcc3d4a..2b653d01e3 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -1826,7 +1826,7 @@ static void vfio_add_emulated_long(VFIOPCIDevice *vdev,
int pos,
vfio_set_long_bits(vdev->emulated_config_bits + pos, mask, mask);
}
-static int vfio_setup_pcie_cap(VFIOPCIDevice *vdev, int pos, uint8_t size,
+static int vfio_setup_pcie_cap(VFIOPCIDevice *vdev, uint8_t pos, uint8_t size,
Error **errp)
{
uint16_t flags;
@@ -1943,11 +1943,7 @@ static int vfio_setup_pcie_cap(VFIOPCIDevice *vdev, int
pos, uint8_t size,
1, PCI_EXP_FLAGS_VERS);
}
- pos = pci_add_capability(&vdev->pdev, PCI_CAP_ID_EXP, pos, size,
- errp);
- if (pos < 0) {
- return pos;
- }
+ pos = pci_add_capability(&vdev->pdev, PCI_CAP_ID_EXP, pos, size);
vdev->pdev.exp.exp_cap = pos;
@@ -2045,14 +2041,14 @@ static int vfio_add_std_cap(VFIOPCIDevice *vdev,
uint8_t pos, Error **errp)
case PCI_CAP_ID_PM:
vfio_check_pm_reset(vdev, pos);
vdev->pm_cap = pos;
- ret = pci_add_capability(pdev, cap_id, pos, size, errp);
+ pci_add_capability(pdev, cap_id, pos, size);
break;
case PCI_CAP_ID_AF:
vfio_check_af_flr(vdev, pos);
- ret = pci_add_capability(pdev, cap_id, pos, size, errp);
+ pci_add_capability(pdev, cap_id, pos, size);
break;
default:
- ret = pci_add_capability(pdev, cap_id, pos, size, errp);
+ pci_add_capability(pdev, cap_id, pos, size);
break;
}
--
2.37.3
- [PATCH v2 06/17] hw/nvme: Omit errp for pci_add_capability, (continued)
- [PATCH v2 06/17] hw/nvme: Omit errp for pci_add_capability, Akihiko Odaki, 2022/10/22
- [PATCH v2 07/17] msi: Omit errp for pci_add_capability, Akihiko Odaki, 2022/10/22
- [PATCH v2 08/17] hw/pci/pci_bridge: Omit errp for pci_add_capability, Akihiko Odaki, 2022/10/22
- [PATCH v2 09/17] pcie: Omit errp for pci_add_capability, Akihiko Odaki, 2022/10/22
- [PATCH v2 10/17] pci/shpc: Omit errp for pci_add_capability, Akihiko Odaki, 2022/10/22
- [PATCH v2 11/17] msix: Omit errp for pci_add_capability, Akihiko Odaki, 2022/10/22
- [PATCH v2 12/17] pci/slotid: Omit errp for pci_add_capability, Akihiko Odaki, 2022/10/22
- [PATCH v2 13/17] hw/pci-bridge/pcie_pci_bridge: Omit errp for pci_add_capability, Akihiko Odaki, 2022/10/22
- [PATCH v2 14/17] hw/vfio/pci-quirks: Omit errp for pci_add_capability, Akihiko Odaki, 2022/10/22
- [PATCH v2 15/17] hw/vfio/pci: Omit errp for pci_add_capability,
Akihiko Odaki <=
- [PATCH v2 16/17] virtio-pci: Omit errp for pci_add_capability, Akihiko Odaki, 2022/10/22
- [PATCH v2 17/17] pci: Remove legacy errp from pci_add_capability, Akihiko Odaki, 2022/10/22