* [PATCH 3/7] powerpc/pci: use pci_is_pcie() to simplify code
[not found] <1378193715-25328-1-git-send-email-wangyijing@huawei.com>
@ 2013-09-03 7:35 ` Yijing Wang
2013-09-04 3:16 ` Gavin Shan
2013-09-04 21:07 ` Kumar Gala
0 siblings, 2 replies; 3+ messages in thread
From: Yijing Wang @ 2013-09-03 7:35 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Gavin Shan, Bjorn Helgaas,
James E.J. Bottomley, David S. Miller
Cc: linux-pci, linux-kernel, Paul Mackerras, Hanjun Guo, Yijing Wang,
linuxppc-dev
Use pci_is_pcie() to simplify code.
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Cc: Gavin Shan <shangw@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
---
arch/powerpc/kernel/eeh.c | 3 +--
arch/powerpc/sysdev/fsl_pci.c | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index 39954fe..b0bd41a 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -189,8 +189,7 @@ static size_t eeh_gather_pci_data(struct eeh_dev *edev, char * buf, size_t len)
}
/* If PCI-E capable, dump PCI-E cap 10, and the AER */
- cap = pci_find_capability(dev, PCI_CAP_ID_EXP);
- if (cap) {
+ if (pci_is_pcie(dev)) {
n += scnprintf(buf+n, len-n, "pci-e cap10:\n");
printk(KERN_WARNING
"EEH: PCI-E capabilities and status follow:\n");
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 46ac1dd..5402a1d 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -41,7 +41,7 @@ static void quirk_fsl_pcie_header(struct pci_dev *dev)
u8 hdr_type;
/* if we aren't a PCIe don't bother */
- if (!pci_find_capability(dev, PCI_CAP_ID_EXP))
+ if (!pci_is_pcie(dev))
return;
/* if we aren't in host mode don't bother */
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 3/7] powerpc/pci: use pci_is_pcie() to simplify code
2013-09-03 7:35 ` [PATCH 3/7] powerpc/pci: use pci_is_pcie() to simplify code Yijing Wang
@ 2013-09-04 3:16 ` Gavin Shan
2013-09-04 21:07 ` Kumar Gala
1 sibling, 0 replies; 3+ messages in thread
From: Gavin Shan @ 2013-09-04 3:16 UTC (permalink / raw)
To: Yijing Wang
Cc: Gavin Shan, Hanjun Guo, linux-kernel, James E.J. Bottomley,
Paul Mackerras, linux-pci, Bjorn Helgaas, linuxppc-dev,
David S. Miller
>Use pci_is_pcie() to simplify code.
>
>Signed-off-by: Yijing Wang <wangyijing@huawei.com>
>Cc: Gavin Shan <shangw@linux.vnet.ibm.com>
>Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>Cc: Paul Mackerras <paulus@samba.org>
>Cc: linuxppc-dev@lists.ozlabs.org
>Cc: linux-kernel@vger.kernel.org
It looks good to me:
Reviewed-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Thanks,
Gavin
>---
> arch/powerpc/kernel/eeh.c | 3 +--
> arch/powerpc/sysdev/fsl_pci.c | 2 +-
> 2 files changed, 2 insertions(+), 3 deletions(-)
>
>diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
>index 39954fe..b0bd41a 100644
>--- a/arch/powerpc/kernel/eeh.c
>+++ b/arch/powerpc/kernel/eeh.c
>@@ -189,8 +189,7 @@ static size_t eeh_gather_pci_data(struct eeh_dev *edev, char * buf, size_t len)
> }
>
> /* If PCI-E capable, dump PCI-E cap 10, and the AER */
>- cap = pci_find_capability(dev, PCI_CAP_ID_EXP);
>- if (cap) {
>+ if (pci_is_pcie(dev)) {
> n += scnprintf(buf+n, len-n, "pci-e cap10:\n");
> printk(KERN_WARNING
> "EEH: PCI-E capabilities and status follow:\n");
>diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
>index 46ac1dd..5402a1d 100644
>--- a/arch/powerpc/sysdev/fsl_pci.c
>+++ b/arch/powerpc/sysdev/fsl_pci.c
>@@ -41,7 +41,7 @@ static void quirk_fsl_pcie_header(struct pci_dev *dev)
> u8 hdr_type;
>
> /* if we aren't a PCIe don't bother */
>- if (!pci_find_capability(dev, PCI_CAP_ID_EXP))
>+ if (!pci_is_pcie(dev))
> return;
>
> /* if we aren't in host mode don't bother */
>--
>1.7.1
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 3/7] powerpc/pci: use pci_is_pcie() to simplify code
2013-09-03 7:35 ` [PATCH 3/7] powerpc/pci: use pci_is_pcie() to simplify code Yijing Wang
2013-09-04 3:16 ` Gavin Shan
@ 2013-09-04 21:07 ` Kumar Gala
1 sibling, 0 replies; 3+ messages in thread
From: Kumar Gala @ 2013-09-04 21:07 UTC (permalink / raw)
To: Yijing Wang
Cc: Gavin Shan, Hanjun Guo, linux-kernel, James E.J. Bottomley,
Paul Mackerras, linux-pci, Bjorn Helgaas, linuxppc-dev,
David S. Miller
On Sep 3, 2013, at 2:35 AM, Yijing Wang wrote:
> Use pci_is_pcie() to simplify code.
>
> Signed-off-by: Yijing Wang <wangyijing@huawei.com>
> Cc: Gavin Shan <shangw@linux.vnet.ibm.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: linuxppc-dev@lists.ozlabs.org
> Cc: linux-kernel@vger.kernel.org
> ---
> arch/powerpc/kernel/eeh.c | 3 +--
> arch/powerpc/sysdev/fsl_pci.c | 2 +-
> 2 files changed, 2 insertions(+), 3 deletions(-)
Acked-by: Kumar Gala <galak@kernel.crashing.org>
(for the fsl_pci.c) change
- k
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-04 21:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1378193715-25328-1-git-send-email-wangyijing@huawei.com>
2013-09-03 7:35 ` [PATCH 3/7] powerpc/pci: use pci_is_pcie() to simplify code Yijing Wang
2013-09-04 3:16 ` Gavin Shan
2013-09-04 21:07 ` Kumar Gala
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).