diff mbox series

[v2,5/9] drm/amdkfd: use helper pci_dev_id

Message ID 50613002-d5a2-2522-b183-4ab156686fce@gmail.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show
Series PCI: add help pci_dev_id | expand

Commit Message

Heiner Kallweit April 24, 2019, 7:14 p.m. UTC
Use new helper pci_dev_id() to simplify the code.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Christian König April 25, 2019, 6:57 a.m. UTC | #1
Am 24.04.19 um 21:14 schrieb Heiner Kallweit:
> Use new helper pci_dev_id() to simplify the code.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Acked-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> index 2cb09e088..769dbc7be 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> @@ -1272,8 +1272,7 @@ int kfd_topology_add_device(struct kfd_dev *gpu)
>   
>   	dev->node_props.vendor_id = gpu->pdev->vendor;
>   	dev->node_props.device_id = gpu->pdev->device;
> -	dev->node_props.location_id = PCI_DEVID(gpu->pdev->bus->number,
> -		gpu->pdev->devfn);
> +	dev->node_props.location_id = pci_dev_id(gpu->pdev);
>   	dev->node_props.max_engine_clk_fcompute =
>   		amdgpu_amdkfd_get_max_engine_clock_in_mhz(dev->gpu->kgd);
>   	dev->node_props.max_engine_clk_ccompute =
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
index 2cb09e088..769dbc7be 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -1272,8 +1272,7 @@  int kfd_topology_add_device(struct kfd_dev *gpu)
 
 	dev->node_props.vendor_id = gpu->pdev->vendor;
 	dev->node_props.device_id = gpu->pdev->device;
-	dev->node_props.location_id = PCI_DEVID(gpu->pdev->bus->number,
-		gpu->pdev->devfn);
+	dev->node_props.location_id = pci_dev_id(gpu->pdev);
 	dev->node_props.max_engine_clk_fcompute =
 		amdgpu_amdkfd_get_max_engine_clock_in_mhz(dev->gpu->kgd);
 	dev->node_props.max_engine_clk_ccompute =