Re: [RFC PATCH] PCI: Use pci_pcie_find_root_port() to get root port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



+ linux-wireless

Yicong Yang <yangyicong@xxxxxxxxxxxxx> writes:

> Previously we use pcie_find_root_port() to get root port from a pcie
> device, use pci_find_pcie_root_port() to get root port from a pci
> device, which increase the complexity.
>
> Unify the two functions and use pci_pcie_find_root_port() to get root
> port from both pci device and pcie device. Then there is no need to
> distinguish the type of the device.
>
> Signed-off-by: Yicong Yang <yangyicong@xxxxxxxxxxxxx>
> ---
>  drivers/net/wireless/intel/iwlwifi/pcie/trans.c |  2 +-
>  drivers/pci/pci-acpi.c                          |  4 ++--
>  drivers/pci/pci.c                               | 24 ------------------------
>  drivers/pci/pcie/aer_inject.c                   |  2 +-
>  drivers/pci/probe.c                             |  2 +-
>  drivers/pci/quirks.c                            |  2 +-
>  drivers/thunderbolt/switch.c                    |  4 ++--
>  include/linux/pci.h                             | 14 +++++++-------
>  8 files changed, 15 insertions(+), 39 deletions(-)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
> index 38d8fe2..556cb8c 100644
> --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
> +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
> @@ -158,7 +158,7 @@ void iwl_trans_pcie_dump_regs(struct iwl_trans *trans)
>
>  	/* Print root port AER registers */
>  	pos = 0;
> -	pdev = pcie_find_root_port(pdev);
> +	pdev = pci_pcie_find_root_port(pdev);
>  	if (pdev)
>  		pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_ERR);
>  	if (pos) {

For the wireless change:

Acked-by: Kalle Valo <kvalo@xxxxxxxxxxxxxx>

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux