[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] xen/arm: pci: modify pci_find_host_bridge_node argument to const pdev
commit 943941fb7a5f968cb48c2b7a8c00f53ad6728575 Author: Rahul Singh <rahul.singh@xxxxxxx> AuthorDate: Fri Sep 9 10:34:39 2022 +0100 Commit: Stefano Stabellini <stefano.stabellini@xxxxxxx> CommitDate: Fri Sep 9 13:48:13 2022 -0700 xen/arm: pci: modify pci_find_host_bridge_node argument to const pdev Modify pci_find_host_bridge_node argument to const pdev to avoid converting the dev to pdev in pci_find_host_bridge_node and also constify the return. Signed-off-by: Rahul Singh <rahul.singh@xxxxxxx> Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx> --- xen/arch/arm/include/asm/pci.h | 3 ++- xen/arch/arm/pci/pci-host-common.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/include/asm/pci.h b/xen/arch/arm/include/asm/pci.h index 7c7449d64f..80a2431804 100644 --- a/xen/arch/arm/include/asm/pci.h +++ b/xen/arch/arm/include/asm/pci.h @@ -106,7 +106,8 @@ bool pci_ecam_need_p2m_hwdom_mapping(struct domain *d, struct pci_host_bridge *bridge, uint64_t addr); struct pci_host_bridge *pci_find_host_bridge(uint16_t segment, uint8_t bus); -struct dt_device_node *pci_find_host_bridge_node(struct device *dev); +const struct dt_device_node * +pci_find_host_bridge_node(const struct pci_dev *pdev); int pci_get_host_bridge_segment(const struct dt_device_node *node, uint16_t *segment); diff --git a/xen/arch/arm/pci/pci-host-common.c b/xen/arch/arm/pci/pci-host-common.c index fd8c0f837a..89ef30028e 100644 --- a/xen/arch/arm/pci/pci-host-common.c +++ b/xen/arch/arm/pci/pci-host-common.c @@ -243,10 +243,10 @@ err_exit: /* * Get host bridge node given a device attached to it. */ -struct dt_device_node *pci_find_host_bridge_node(struct device *dev) +const struct dt_device_node * +pci_find_host_bridge_node(const struct pci_dev *pdev) { struct pci_host_bridge *bridge; - struct pci_dev *pdev = dev_to_pci(dev); bridge = pci_find_host_bridge(pdev->seg, pdev->bus); if ( unlikely(!bridge) ) -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |