* [TRIVIAL PATCH] PCI: Change pci_host_common_probe visibility
@ 2017-03-28 15:29 Marc Gonzalez
2017-04-10 12:26 ` Marc Gonzalez
0 siblings, 1 reply; 3+ messages in thread
From: Marc Gonzalez @ 2017-03-28 15:29 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci, Lorenzo Pieralisi, Jayachandran C
pci_host_common_probe is defined when CONFIG_PCI_HOST_COMMON=y
therefore the function declaration should match that.
drivers/pci/host/pcie-tango.c:300:9: error:
implicit declaration of function 'pci_host_common_probe'
Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
---
include/linux/pci-ecam.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h
index 33c4750781a0..e746803df566 100644
--- a/include/linux/pci-ecam.h
+++ b/include/linux/pci-ecam.h
@@ -60,7 +60,7 @@ void __iomem *pci_ecam_map_bus(struct pci_bus *bus, unsigned int devfn,
/* default ECAM ops */
extern struct pci_ecam_ops pci_generic_ecam_ops;
-#ifdef CONFIG_PCI_HOST_GENERIC
+#ifdef CONFIG_PCI_HOST_COMMON
/* for DT-based PCI controllers that support ECAM */
int pci_host_common_probe(struct platform_device *pdev,
struct pci_ecam_ops *ops);
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [TRIVIAL PATCH] PCI: Change pci_host_common_probe visibility
2017-03-28 15:29 [TRIVIAL PATCH] PCI: Change pci_host_common_probe visibility Marc Gonzalez
@ 2017-04-10 12:26 ` Marc Gonzalez
2017-04-18 19:26 ` Bjorn Helgaas
0 siblings, 1 reply; 3+ messages in thread
From: Marc Gonzalez @ 2017-04-10 12:26 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci, Lorenzo Pieralisi, Jayachandran C, Arnd Bergmann
On 28/03/2017 17:29, Marc Gonzalez wrote:
> pci_host_common_probe is defined when CONFIG_PCI_HOST_COMMON=y
> therefore the function declaration should match that.
>
> drivers/pci/host/pcie-tango.c:300:9: error:
> implicit declaration of function 'pci_host_common_probe'
>
> Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
> ---
> include/linux/pci-ecam.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h
> index 33c4750781a0..e746803df566 100644
> --- a/include/linux/pci-ecam.h
> +++ b/include/linux/pci-ecam.h
> @@ -60,7 +60,7 @@ void __iomem *pci_ecam_map_bus(struct pci_bus *bus, unsigned int devfn,
> /* default ECAM ops */
> extern struct pci_ecam_ops pci_generic_ecam_ops;
>
> -#ifdef CONFIG_PCI_HOST_GENERIC
> +#ifdef CONFIG_PCI_HOST_COMMON
> /* for DT-based PCI controllers that support ECAM */
> int pci_host_common_probe(struct platform_device *pdev,
> struct pci_ecam_ops *ops);
>
Hello Bjorn,
What is the status of this patch?
Arnd submitted an alternative patch earlier.
https://patchwork.kernel.org/patch/9637045/
https://patchwork.kernel.org/patch/9649993/
Arnd's solution is to make the declaration always visible.
My solution is to make the declaration visible only when
CONFIG_PCI_HOST_COMMON is defined.
The difference boils down to getting an error
at link-time VS at compile-time.
Regards.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [TRIVIAL PATCH] PCI: Change pci_host_common_probe visibility
2017-04-10 12:26 ` Marc Gonzalez
@ 2017-04-18 19:26 ` Bjorn Helgaas
0 siblings, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2017-04-18 19:26 UTC (permalink / raw)
To: Marc Gonzalez; +Cc: linux-pci, Lorenzo Pieralisi, Jayachandran C, Arnd Bergmann
On Mon, Apr 10, 2017 at 02:26:42PM +0200, Marc Gonzalez wrote:
> On 28/03/2017 17:29, Marc Gonzalez wrote:
>
> > pci_host_common_probe is defined when CONFIG_PCI_HOST_COMMON=y
> > therefore the function declaration should match that.
> >
> > drivers/pci/host/pcie-tango.c:300:9: error:
> > implicit declaration of function 'pci_host_common_probe'
> >
> > Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
> > ---
> > include/linux/pci-ecam.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h
> > index 33c4750781a0..e746803df566 100644
> > --- a/include/linux/pci-ecam.h
> > +++ b/include/linux/pci-ecam.h
> > @@ -60,7 +60,7 @@ void __iomem *pci_ecam_map_bus(struct pci_bus *bus, unsigned int devfn,
> > /* default ECAM ops */
> > extern struct pci_ecam_ops pci_generic_ecam_ops;
> >
> > -#ifdef CONFIG_PCI_HOST_GENERIC
> > +#ifdef CONFIG_PCI_HOST_COMMON
> > /* for DT-based PCI controllers that support ECAM */
> > int pci_host_common_probe(struct platform_device *pdev,
> > struct pci_ecam_ops *ops);
> >
>
> Hello Bjorn,
>
> What is the status of this patch?
>
> Arnd submitted an alternative patch earlier.
>
> https://patchwork.kernel.org/patch/9637045/
> https://patchwork.kernel.org/patch/9649993/
>
> Arnd's solution is to make the declaration always visible.
> My solution is to make the declaration visible only when
> CONFIG_PCI_HOST_COMMON is defined.
>
> The difference boils down to getting an error
> at link-time VS at compile-time.
I applied this to pci/misc for v4.12, thanks!
Arnd's patch included:
Fixes: 4e64dbe226e7 ("PCI: generic: Expose pci_host_common_probe() for use by other drivers")
which didn't look quite right to me. I was originally hoping to merge
it for v4.11, but I didn't think I had quite the right justification
for that.
In any case, I like the idea of making the declaration visible in
exactly the same case the definition is visible.
Bjorn
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-18 19:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-28 15:29 [TRIVIAL PATCH] PCI: Change pci_host_common_probe visibility Marc Gonzalez
2017-04-10 12:26 ` Marc Gonzalez
2017-04-18 19:26 ` Bjorn Helgaas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.