Skip to contentSkip to conversation

dmaengine: hisilicon: fix PCI_MSI dependency

PATCH In review Arnd Bergmann 3 participants 3 messages Apr 8, 2020 – Apr 15, 2020 dmaengine

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmaengine: hisilicon: fix PCI_MSI dependency

The dependency is phrased incorrectly, so on arm64, it is possible to build with CONFIG_PCI disabled, resulting a build failure:

drivers/dma/hisi_dma.c: In function 'hisi_dma_free_irq_vectors':
drivers/dma/hisi_dma.c:138:2: error: implicit declaration of function 'pci_free_irq_vectors'; did you mean 'pci_alloc_irq_vectors'? [-Werror=implicit-function-declaration]

  138 |  pci_free_irq_vectors(data);
      |  ^~~~~~~~~~~~~~~~~~~~
      |  pci_alloc_irq_vectors
drivers/dma/hisi_dma.c: At top level:
drivers/dma/hisi_dma.c:605:1: warning: data definition has no type or storage class
  605 | module_pci_driver(hisi_dma_pci_driver);
      | ^~~~~~~~~~~~~~~~~

drivers/dma/hisi_dma.c:605:1: error: type defaults to 'int' in declaration of 'module_pci_driver' [-Werror=implicit-int] drivers/dma/hisi_dma.c:605:1: warning: parameter names (without types) in function declaration drivers/dma/hisi_dma.c:599:26: error: 'hisi_dma_pci_driver' defined but not used [-Werror=unused-variable]
599 | static struct pci_driver hisi_dma_pci_driver = {

Change it so we always depend on PCI_MSI, even on ARM64

Fixes e9f08b65250d ("dmaengine: hisilicon: Add Kunpeng DMA engine support")
---
 drivers/dma/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/dma/Kconfig +2 -1
index 98ae15c82a30..c19e25b140c5 100644
@@ -241,7 +241,8 @@ config FSL_RAID
 
 config HISI_DMA
 	tristate "HiSilicon DMA Engine support"
-	depends on ARM64 || (COMPILE_TEST && PCI_MSI)
+	depends on ARM64 || COMPILE_TEST
+	depends on PCI_MSI
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help
Signature · 1 line
2.26.0
#1 lore raw
Quoted 31 lines · Arnd Bergmann

The dependency is phrased incorrectly, so on arm64, it is possible to build with CONFIG_PCI disabled, resulting a build failure:

drivers/dma/hisi_dma.c: In function 'hisi_dma_free_irq_vectors':
drivers/dma/hisi_dma.c:138:2: error: implicit declaration of function 'pci_free_irq_vectors'; did you mean 'pci_alloc_irq_vectors'? [-Werror=implicit-function-declaration]

  138 |  pci_free_irq_vectors(data);
      |  ^~~~~~~~~~~~~~~~~~~~
      |  pci_alloc_irq_vectors
drivers/dma/hisi_dma.c: At top level:
drivers/dma/hisi_dma.c:605:1: warning: data definition has no type or storage class
  605 | module_pci_driver(hisi_dma_pci_driver);
      | ^~~~~~~~~~~~~~~~~

drivers/dma/hisi_dma.c:605:1: error: type defaults to 'int' in declaration of 'module_pci_driver' [-Werror=implicit-int] drivers/dma/hisi_dma.c:605:1: warning: parameter names (without types) in function declaration drivers/dma/hisi_dma.c:599:26: error: 'hisi_dma_pci_driver' defined but not used [-Werror=unused-variable]
599 | static struct pci_driver hisi_dma_pci_driver = {

Change it so we always depend on PCI_MSI, even on ARM64

Fixes e9f08b65250d ("dmaengine: hisilicon: Add Kunpeng DMA engine support")
---
 drivers/dma/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/dma/Kconfig +0 -0
index 98ae15c82a30..c19e25b140c5 100644

drivers/dma/Kconfig config FSL_RAID · line 248

Quoted 9 lines
drivers/dma/Kconfig +2 -1
@@ -241,7 +241,8 @@ config FSL_RAID
 
 config HISI_DMA
 	tristate "HiSilicon DMA Engine support"
-	depends on ARM64 || (COMPILE_TEST && PCI_MSI)
+	depends on ARM64 || COMPILE_TEST
+	depends on PCI_MSI
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help

Hi Arnd,

There was a fix from Haibing: https://lkml.org/lkml/2020/3/28/158
Maybe Vinod will review and take it later :)

Best,
Zhou

maintainer
#2 lore raw
Quoted 44 lines · Zhou Wang
Quoted 31 lines · Arnd Bergmann

The dependency is phrased incorrectly, so on arm64, it is possible to build with CONFIG_PCI disabled, resulting a build failure:

drivers/dma/hisi_dma.c: In function 'hisi_dma_free_irq_vectors':
drivers/dma/hisi_dma.c:138:2: error: implicit declaration of function 'pci_free_irq_vectors'; did you mean 'pci_alloc_irq_vectors'? [-Werror=implicit-function-declaration]

  138 |  pci_free_irq_vectors(data);
      |  ^~~~~~~~~~~~~~~~~~~~
      |  pci_alloc_irq_vectors
drivers/dma/hisi_dma.c: At top level:
drivers/dma/hisi_dma.c:605:1: warning: data definition has no type or storage class
  605 | module_pci_driver(hisi_dma_pci_driver);
      | ^~~~~~~~~~~~~~~~~

drivers/dma/hisi_dma.c:605:1: error: type defaults to 'int' in declaration of 'module_pci_driver' [-Werror=implicit-int] drivers/dma/hisi_dma.c:605:1: warning: parameter names (without types) in function declaration drivers/dma/hisi_dma.c:599:26: error: 'hisi_dma_pci_driver' defined but not used [-Werror=unused-variable]
599 | static struct pci_driver hisi_dma_pci_driver = {

Change it so we always depend on PCI_MSI, even on ARM64

Fixes e9f08b65250d ("dmaengine: hisilicon: Add Kunpeng DMA engine support")
---
 drivers/dma/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/dma/Kconfig +0 -0
index 98ae15c82a30..c19e25b140c5 100644

drivers/dma/Kconfig config FSL_RAID · line 248

Quoted 9 lines
drivers/dma/Kconfig +2 -1
@@ -241,7 +241,8 @@ config FSL_RAID
 
 config HISI_DMA
 	tristate "HiSilicon DMA Engine support"
-	depends on ARM64 || (COMPILE_TEST && PCI_MSI)
+	depends on ARM64 || COMPILE_TEST
+	depends on PCI_MSI
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help

Hi Arnd,

Quoted 2 lines

There was a fix from Haibing: https://lkml.org/lkml/2020/3/28/158
Maybe Vinod will review and take it later :)

It should be in -next tomorrow :)

Signature · 1 line
~Vinod