* [PATCH] PCI: generic: stop hiding pci_host_common_probe declaration
@ 2017-03-21 15:59 Arnd Bergmann
2017-03-29 13:05 ` Tomasz Nowicki
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Arnd Bergmann @ 2017-03-21 15:59 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Arnd Bergmann, Jayachandran C, Tomasz Nowicki, Lorenzo Pieralisi,
Dongdong Liu, Christopher Covington, Duc Dang, linux-pci,
linux-kernel
When pci_host_common_probe() was moved into a separate module, the #ifdef around
the declaration was left in the header file, which can lead to build errors in
some configurations:
drivers/pci/host/pci-thunder-pem.c: In function 'thunder_pem_probe':
drivers/pci/host/pci-thunder-pem.c:412:9: error: implicit declaration of function 'pci_host_common_probe';did you mean 'pci_host_bridge_priv'? [-Werror=implicit-function-declaration]
The ifdef serves no real purpose anyway, so we can just remove it.
Fixes: 4e64dbe226e7 ("PCI: generic: Expose pci_host_common_probe() for use by other drivers")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/linux/pci-ecam.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h
index f0d2b9451270..92a73847e1d3 100644
--- a/include/linux/pci-ecam.h
+++ b/include/linux/pci-ecam.h
@@ -68,9 +68,7 @@ extern struct pci_ecam_ops xgene_v1_pcie_ecam_ops; /* APM X-Gene PCIe v1 */
extern struct pci_ecam_ops xgene_v2_pcie_ecam_ops; /* APM X-Gene PCIe v2.x */
#endif
-#ifdef CONFIG_PCI_HOST_GENERIC
/* for DT-based PCI controllers that support ECAM */
int pci_host_common_probe(struct platform_device *pdev,
struct pci_ecam_ops *ops);
#endif
-#endif
--
2.9.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI: generic: stop hiding pci_host_common_probe declaration
2017-03-21 15:59 [PATCH] PCI: generic: stop hiding pci_host_common_probe declaration Arnd Bergmann
@ 2017-03-29 13:05 ` Tomasz Nowicki
2017-04-03 21:33 ` Bjorn Helgaas
2017-04-04 14:02 ` Marc Gonzalez
2 siblings, 0 replies; 4+ messages in thread
From: Tomasz Nowicki @ 2017-03-29 13:05 UTC (permalink / raw)
To: Arnd Bergmann, Bjorn Helgaas
Cc: Jayachandran C, Lorenzo Pieralisi, Dongdong Liu,
Christopher Covington, Duc Dang, linux-pci, linux-kernel
Hi Arnd,
On 21.03.2017 16:59, Arnd Bergmann wrote:
> When pci_host_common_probe() was moved into a separate module, the #ifdef around
> the declaration was left in the header file, which can lead to build errors in
> some configurations:
>
> drivers/pci/host/pci-thunder-pem.c: In function 'thunder_pem_probe':
> drivers/pci/host/pci-thunder-pem.c:412:9: error: implicit declaration of function 'pci_host_common_probe';did you mean 'pci_host_bridge_priv'? [-Werror=implicit-function-declaration]
>
> The ifdef serves no real purpose anyway, so we can just remove it.
>
> Fixes: 4e64dbe226e7 ("PCI: generic: Expose pci_host_common_probe() for use by other drivers")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> include/linux/pci-ecam.h | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h
> index f0d2b9451270..92a73847e1d3 100644
> --- a/include/linux/pci-ecam.h
> +++ b/include/linux/pci-ecam.h
> @@ -68,9 +68,7 @@ extern struct pci_ecam_ops xgene_v1_pcie_ecam_ops; /* APM X-Gene PCIe v1 */
> extern struct pci_ecam_ops xgene_v2_pcie_ecam_ops; /* APM X-Gene PCIe v2.x */
> #endif
>
> -#ifdef CONFIG_PCI_HOST_GENERIC
> /* for DT-based PCI controllers that support ECAM */
> int pci_host_common_probe(struct platform_device *pdev,
> struct pci_ecam_ops *ops);
> #endif
> -#endif
>
Thanks for fixing this.
Reviewed-by: Tomasz Nowicki <tn@semihalf.com>
Tested-by: Tomasz Nowicki <tn@semihalf.com>
Tomasz
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI: generic: stop hiding pci_host_common_probe declaration
2017-03-21 15:59 [PATCH] PCI: generic: stop hiding pci_host_common_probe declaration Arnd Bergmann
2017-03-29 13:05 ` Tomasz Nowicki
@ 2017-04-03 21:33 ` Bjorn Helgaas
2017-04-04 14:02 ` Marc Gonzalez
2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2017-04-03 21:33 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Bjorn Helgaas, Jayachandran C, Tomasz Nowicki, Lorenzo Pieralisi,
Dongdong Liu, Christopher Covington, Duc Dang, linux-pci,
linux-kernel
On Tue, Mar 21, 2017 at 04:59:52PM +0100, Arnd Bergmann wrote:
> When pci_host_common_probe() was moved into a separate module, the #ifdef around
> the declaration was left in the header file, which can lead to build errors in
> some configurations:
>
> drivers/pci/host/pci-thunder-pem.c: In function 'thunder_pem_probe':
> drivers/pci/host/pci-thunder-pem.c:412:9: error: implicit declaration of function 'pci_host_common_probe';did you mean 'pci_host_bridge_priv'? [-Werror=implicit-function-declaration]
>
> The ifdef serves no real purpose anyway, so we can just remove it.
>
> Fixes: 4e64dbe226e7 ("PCI: generic: Expose pci_host_common_probe() for use by other drivers")
It looks like 4e64dbe226e7 was merged for v4.6-rc1. Does that mean
this build error has been there that long? Is there another, more
recent commit that actually broke this?
I suspect something broke in the v4.11 merge window, so I'm fishing
for a commit from that window so I can include this for v4.11.
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> include/linux/pci-ecam.h | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h
> index f0d2b9451270..92a73847e1d3 100644
> --- a/include/linux/pci-ecam.h
> +++ b/include/linux/pci-ecam.h
> @@ -68,9 +68,7 @@ extern struct pci_ecam_ops xgene_v1_pcie_ecam_ops; /* APM X-Gene PCIe v1 */
> extern struct pci_ecam_ops xgene_v2_pcie_ecam_ops; /* APM X-Gene PCIe v2.x */
> #endif
>
> -#ifdef CONFIG_PCI_HOST_GENERIC
> /* for DT-based PCI controllers that support ECAM */
> int pci_host_common_probe(struct platform_device *pdev,
> struct pci_ecam_ops *ops);
> #endif
> -#endif
> --
> 2.9.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI: generic: stop hiding pci_host_common_probe declaration
2017-03-21 15:59 [PATCH] PCI: generic: stop hiding pci_host_common_probe declaration Arnd Bergmann
2017-03-29 13:05 ` Tomasz Nowicki
2017-04-03 21:33 ` Bjorn Helgaas
@ 2017-04-04 14:02 ` Marc Gonzalez
2 siblings, 0 replies; 4+ messages in thread
From: Marc Gonzalez @ 2017-04-04 14:02 UTC (permalink / raw)
To: Arnd Bergmann, Bjorn Helgaas
Cc: Jayachandran C, Tomasz Nowicki, Lorenzo Pieralisi, Dongdong Liu,
Christopher Covington, Duc Dang, linux-pci, linux-kernel, Mason
On 21/03/2017 16:59, Arnd Bergmann wrote:
> When pci_host_common_probe() was moved into a separate module, the #ifdef around
> the declaration was left in the header file, which can lead to build errors in
> some configurations:
>
> drivers/pci/host/pci-thunder-pem.c: In function 'thunder_pem_probe':
> drivers/pci/host/pci-thunder-pem.c:412:9: error: implicit declaration of function 'pci_host_common_probe';did you mean 'pci_host_bridge_priv'? [-Werror=implicit-function-declaration]
>
> The ifdef serves no real purpose anyway, so we can just remove it.
>
> Fixes: 4e64dbe226e7 ("PCI: generic: Expose pci_host_common_probe() for use by other drivers")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> include/linux/pci-ecam.h | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h
> index f0d2b9451270..92a73847e1d3 100644
> --- a/include/linux/pci-ecam.h
> +++ b/include/linux/pci-ecam.h
> @@ -68,9 +68,7 @@ extern struct pci_ecam_ops xgene_v1_pcie_ecam_ops; /* APM X-Gene PCIe v1 */
> extern struct pci_ecam_ops xgene_v2_pcie_ecam_ops; /* APM X-Gene PCIe v2.x */
> #endif
>
> -#ifdef CONFIG_PCI_HOST_GENERIC
> /* for DT-based PCI controllers that support ECAM */
> int pci_host_common_probe(struct platform_device *pdev,
> struct pci_ecam_ops *ops);
> #endif
> -#endif
>
I ran into this issue as well (on v4.9) and submitted a patch a week
after you did, by pure coincidence:
Subject: [TRIVIAL PATCH] PCI: Change pci_host_common_probe visibility
Date: Tue, 28 Mar 2017 17:29:51 +0200
https://www.spinics.net/lists/linux-pci/msg59823.html
Regards.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-04-04 14:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-21 15:59 [PATCH] PCI: generic: stop hiding pci_host_common_probe declaration Arnd Bergmann
2017-03-29 13:05 ` Tomasz Nowicki
2017-04-03 21:33 ` Bjorn Helgaas
2017-04-04 14:02 ` Marc Gonzalez
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).