pci: Define pci_bus_dev_fn/pci_bus_fn/pci_bus_ret_fn
commitb3dcf94f77fdf5bbea76d7101cc2a300d2550adb
authorPeter Xu <peterx@redhat.com>
Thu, 28 Oct 2021 04:31:25 +0000 (28 12:31 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 1 Nov 2021 23:36:11 +0000 (1 19:36 -0400)
treebbe9fc9c91cb7a4cd9106b209ee628e5d8ad32c1
parent36efa250a4ff56a73a5a73540c5097ffd7a67170
pci: Define pci_bus_dev_fn/pci_bus_fn/pci_bus_ret_fn

They're used in quite a few places of pci.[ch] and also in the rest of the code
base.  Define them so that it doesn't need to be defined all over the places.

The pci_bus_fn is similar to pci_bus_dev_fn that only takes a PCIBus* and an
opaque.  The pci_bus_ret_fn is similar to pci_bus_fn but it allows to return a
void* pointer.

Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20211028043129.38871-2-peterx@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/pci/pci.c
include/hw/pci/pci.h