linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Yicong Yang <yangyicong@hisilicon.com>
Cc: <helgaas@kernel.org>, <linux-pci@vger.kernel.org>,
	<mika.westerberg@linux.intel.com>, <linuxarm@huawei.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [RFC PATCH] PCI: Use pci_pcie_find_root_port() to get root port
Date: Tue, 07 Apr 2020 18:00:44 +0300	[thread overview]
Message-ID: <87zhbnuyqr.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1586262717-23566-1-git-send-email-yangyicong@hisilicon.com> (Yicong Yang's message of "Tue, 7 Apr 2020 20:31:57 +0800")

+ linux-wireless

Yicong Yang <yangyicong@hisilicon.com> 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@hisilicon.com>
> ---
>  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@codeaurora.org>

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

  reply	other threads:[~2020-04-07 15:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-07 12:31 [RFC PATCH] PCI: Use pci_pcie_find_root_port() to get root port Yicong Yang
2020-04-07 15:00 ` Kalle Valo [this message]
2020-04-17  9:23 ` Mika Westerberg
2020-04-18  1:08   ` Yicong Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zhbnuyqr.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@codeaurora.org \
    --cc=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=yangyicong@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).