All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pci: mvebu: add MVEBU_MBUS dependency
@ 2018-05-29  9:41 Arnd Bergmann
  2018-05-29 14:24 ` Rob Herring
  2018-05-30 15:20 ` Bjorn Helgaas
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2018-05-29  9:41 UTC (permalink / raw)
  To: Lorenzo Pieralisi, Bjorn Helgaas
  Cc: Arnd Bergmann, Ryder Lee, Cyrille Pitchen, Shawn Lin,
	Rob Herring, Marc Gonzalez, linux-pci, linux-kernel

Enabling the PCI_MVEBU driver for compile testing caused a build failure
on ARM randconfig builds:

drivers/pci/host/pci-mvebu.c: In function 'mvebu_pcie_del_windows':
drivers/pci/host/pci-mvebu.c:341:3: error: implicit declaration of function 'mvebu_mbus_del_window'; did you mean 'mvebu_pcie_del_windows'? [-Werror=implicit-function-declaration]
   mvebu_mbus_del_window(base, sz);
   ^~~~~~~~~~~~~~~~~~~~~
   mvebu_pcie_del_windows
drivers/pci/host/pci-mvebu.c: In function 'mvebu_pcie_add_windows':
drivers/pci/host/pci-mvebu.c:364:9: error: implicit declaration of function 'mvebu_mbus_add_window_remap_by_id'; did you mean 'mvebu_pcie_add_windows'? [-Werror=implicit-function-declaration]
   ret = mvebu_mbus_add_window_remap_by_id(target, attribute, base,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         mvebu_pcie_add_windows
drivers/pci/host/pci-mvebu.c: In function 'mvebu_pcie_probe':
drivers/pci/host/pci-mvebu.c:1209:2: error: implicit declaration of function 'mvebu_mbus_get_pcie_mem_aperture'; did you mean 'mvebu_mbus_get_io_win_info'? [-Werror=implicit-function-declaration]
drivers/pci/host/pci-mvebu.c:1215:2: error: implicit declaration of function 'mvebu_mbus_get_pcie_io_aperture'; did you mean 'mvebu_mbus_get_io_win_info'? [-Werror=implicit-function-declaration]

The problem is that the mbus helper functions are not declared in the
header. There are two ways of solving this: we can change the header
to provide empty stub functions for CONFIG_MVEBU_MBUS=n, or we can
add back the dependency here.

I picked the second option since that is simpler, but it somewhat
defeats the purpose of the original patch because we still cannot
compile test on other platforms this way.

Fixes: 51bc085d6454 ("PCI: Improve host drivers compile test coverage")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/pci/host/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig
index fa51d0893384..5340950f4b98 100644
--- a/drivers/pci/host/Kconfig
+++ b/drivers/pci/host/Kconfig
@@ -6,6 +6,7 @@ menu "PCI host controller drivers"
 config PCI_MVEBU
 	bool "Marvell EBU PCIe controller"
 	depends on ARCH_MVEBU || ARCH_DOVE || COMPILE_TEST
+	depends on MVEBU_MBUS
 	depends on ARM
 	depends on OF
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] pci: mvebu: add MVEBU_MBUS dependency
  2018-05-29  9:41 [PATCH] pci: mvebu: add MVEBU_MBUS dependency Arnd Bergmann
@ 2018-05-29 14:24 ` Rob Herring
  2018-05-30 15:20 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2018-05-29 14:24 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Lorenzo Pieralisi, Bjorn Helgaas, Ryder Lee, Cyrille Pitchen,
	Shawn Lin, Marc Gonzalez, linux-pci, linux-kernel

On Tue, May 29, 2018 at 4:41 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> Enabling the PCI_MVEBU driver for compile testing caused a build failure
> on ARM randconfig builds:
>
> drivers/pci/host/pci-mvebu.c: In function 'mvebu_pcie_del_windows':
> drivers/pci/host/pci-mvebu.c:341:3: error: implicit declaration of function 'mvebu_mbus_del_window'; did you mean 'mvebu_pcie_del_windows'? [-Werror=implicit-function-declaration]
>    mvebu_mbus_del_window(base, sz);
>    ^~~~~~~~~~~~~~~~~~~~~
>    mvebu_pcie_del_windows
> drivers/pci/host/pci-mvebu.c: In function 'mvebu_pcie_add_windows':
> drivers/pci/host/pci-mvebu.c:364:9: error: implicit declaration of function 'mvebu_mbus_add_window_remap_by_id'; did you mean 'mvebu_pcie_add_windows'? [-Werror=implicit-function-declaration]
>    ret = mvebu_mbus_add_window_remap_by_id(target, attribute, base,
>          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>          mvebu_pcie_add_windows
> drivers/pci/host/pci-mvebu.c: In function 'mvebu_pcie_probe':
> drivers/pci/host/pci-mvebu.c:1209:2: error: implicit declaration of function 'mvebu_mbus_get_pcie_mem_aperture'; did you mean 'mvebu_mbus_get_io_win_info'? [-Werror=implicit-function-declaration]
> drivers/pci/host/pci-mvebu.c:1215:2: error: implicit declaration of function 'mvebu_mbus_get_pcie_io_aperture'; did you mean 'mvebu_mbus_get_io_win_info'? [-Werror=implicit-function-declaration]
>
> The problem is that the mbus helper functions are not declared in the
> header. There are two ways of solving this: we can change the header
> to provide empty stub functions for CONFIG_MVEBU_MBUS=n, or we can
> add back the dependency here.

Probably better to just make these non-standard dependencies explicit.

> I picked the second option since that is simpler, but it somewhat
> defeats the purpose of the original patch because we still cannot
> compile test on other platforms this way.
>
> Fixes: 51bc085d6454 ("PCI: Improve host drivers compile test coverage")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pci: mvebu: add MVEBU_MBUS dependency
  2018-05-29  9:41 [PATCH] pci: mvebu: add MVEBU_MBUS dependency Arnd Bergmann
  2018-05-29 14:24 ` Rob Herring
@ 2018-05-30 15:20 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2018-05-30 15:20 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Lorenzo Pieralisi, Bjorn Helgaas, Ryder Lee, Cyrille Pitchen,
	Shawn Lin, Rob Herring, Marc Gonzalez, linux-pci, linux-kernel

On Tue, May 29, 2018 at 11:41:51AM +0200, Arnd Bergmann wrote:
> Enabling the PCI_MVEBU driver for compile testing caused a build failure
> on ARM randconfig builds:
> 
> drivers/pci/host/pci-mvebu.c: In function 'mvebu_pcie_del_windows':
> drivers/pci/host/pci-mvebu.c:341:3: error: implicit declaration of function 'mvebu_mbus_del_window'; did you mean 'mvebu_pcie_del_windows'? [-Werror=implicit-function-declaration]
>    mvebu_mbus_del_window(base, sz);
>    ^~~~~~~~~~~~~~~~~~~~~
>    mvebu_pcie_del_windows
> drivers/pci/host/pci-mvebu.c: In function 'mvebu_pcie_add_windows':
> drivers/pci/host/pci-mvebu.c:364:9: error: implicit declaration of function 'mvebu_mbus_add_window_remap_by_id'; did you mean 'mvebu_pcie_add_windows'? [-Werror=implicit-function-declaration]
>    ret = mvebu_mbus_add_window_remap_by_id(target, attribute, base,
>          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>          mvebu_pcie_add_windows
> drivers/pci/host/pci-mvebu.c: In function 'mvebu_pcie_probe':
> drivers/pci/host/pci-mvebu.c:1209:2: error: implicit declaration of function 'mvebu_mbus_get_pcie_mem_aperture'; did you mean 'mvebu_mbus_get_io_win_info'? [-Werror=implicit-function-declaration]
> drivers/pci/host/pci-mvebu.c:1215:2: error: implicit declaration of function 'mvebu_mbus_get_pcie_io_aperture'; did you mean 'mvebu_mbus_get_io_win_info'? [-Werror=implicit-function-declaration]
> 
> The problem is that the mbus helper functions are not declared in the
> header. There are two ways of solving this: we can change the header
> to provide empty stub functions for CONFIG_MVEBU_MBUS=n, or we can
> add back the dependency here.
> 
> I picked the second option since that is simpler, but it somewhat
> defeats the purpose of the original patch because we still cannot
> compile test on other platforms this way.
> 
> Fixes: 51bc085d6454 ("PCI: Improve host drivers compile test coverage")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks, I added this when doing the merge.

> ---
>  drivers/pci/host/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig
> index fa51d0893384..5340950f4b98 100644
> --- a/drivers/pci/host/Kconfig
> +++ b/drivers/pci/host/Kconfig
> @@ -6,6 +6,7 @@ menu "PCI host controller drivers"
>  config PCI_MVEBU
>  	bool "Marvell EBU PCIe controller"
>  	depends on ARCH_MVEBU || ARCH_DOVE || COMPILE_TEST
> +	depends on MVEBU_MBUS
>  	depends on ARM
>  	depends on OF
>  
> -- 
> 2.9.0
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-30 15:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-29  9:41 [PATCH] pci: mvebu: add MVEBU_MBUS dependency Arnd Bergmann
2018-05-29 14:24 ` Rob Herring
2018-05-30 15:20 ` 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.