From: Bjorn Helgaas <bhelgaas@google.com>
To: Yijing Wang <wangyijing@huawei.com>
Cc: linux-pci@vger.kernel.org,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: [PATCH 2/2] PCI: Refactor pci_is_bridge()
Date: Fri, 4 Apr 2014 17:32:51 -0600 [thread overview]
Message-ID: <20140404233251.GB15806@google.com> (raw)
In-Reply-To: <1394789926-11912-1-git-send-email-wangyijing@huawei.com>
On Fri, Mar 14, 2014 at 05:38:46PM +0800, Yijing Wang wrote:
> Refactor pci_is_bridge(), check pci device
> hdr_type instead, and move it in include/linux/pci.h
>
> Signed-off-by: Yijing Wang <wangyijing@huawei.com>
> ---
> include/linux/pci.h | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 33aa2ca..22370c4 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -1649,6 +1649,12 @@ static inline bool pci_is_pcie(struct pci_dev *dev)
> return pci_pcie_cap(dev);
> }
>
> +static inline bool pci_is_bridge(struct pci_dev *dev)
> +{
> + return dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
> + dev->hdr_type == PCI_HEADER_TYPE_CARDBUS;
> +}
There's no point in adding this unless somebody uses it (but I assume
you probably meant to use it in acpi_pci_find_companion() as I mentioned).
> /**
> * pcie_caps_reg - get the PCIe Capabilities Register
> * @dev: PCI device
> --
> 1.7.1
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-04-04 23:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-14 9:38 [PATCH 2/2] PCI: Refactor pci_is_bridge() Yijing Wang
2014-04-04 23:32 ` Bjorn Helgaas [this message]
2014-04-08 9:26 ` Yijing Wang
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=20140404233251.GB15806@google.com \
--to=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=wangyijing@huawei.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).