linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Vinod Koul <vkoul@kernel.org>,
	Zhou Wang <wangzhou1@hisilicon.com>,
	Zhenfa Qiu <qiuzhenfa@hisilicon.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Dan Williams <dan.j.williams@intel.com>,
	dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] dmaengine: hisilicon: fix PCI_MSI dependency
Date: Wed,  8 Apr 2020 22:05:20 +0200	[thread overview]
Message-ID: <20200408200559.4124238-1-arnd@arndb.de> (raw)

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/dma/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 98ae15c82a30..c19e25b140c5 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -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
-- 
2.26.0


             reply	other threads:[~2020-04-08 20:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08 20:05 Arnd Bergmann [this message]
2020-04-09  1:57 ` [PATCH] dmaengine: hisilicon: fix PCI_MSI dependency Zhou Wang
2020-04-15 16:02   ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200408200559.4124238-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=qiuzhenfa@hisilicon.com \
    --cc=vkoul@kernel.org \
    --cc=wangzhou1@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).