linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: mana: fix PCI_HYPERV dependency
@ 2021-04-22 13:34 Arnd Bergmann
  2021-04-22 17:27 ` Dexuan Cui
  2021-04-22 20:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2021-04-22 13:34 UTC (permalink / raw)
  To: K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu,
	Dexuan Cui, David S. Miller, Jakub Kicinski
  Cc: Arnd Bergmann, Shachar Raindel, linux-hyperv, netdev, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The MANA driver causes a build failure in some configurations when
it selects an unavailable symbol:

WARNING: unmet direct dependencies detected for PCI_HYPERV
  Depends on [n]: PCI [=y] && X86_64 [=y] && HYPERV [=n] && PCI_MSI [=y] && PCI_MSI_IRQ_DOMAIN [=y] && SYSFS [=y]
  Selected by [y]:
  - MICROSOFT_MANA [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_MICROSOFT [=y] && PCI_MSI [=y] && X86_64 [=y]
drivers/pci/controller/pci-hyperv.c: In function 'hv_irq_unmask':
drivers/pci/controller/pci-hyperv.c:1217:9: error: implicit declaration of function 'hv_set_msi_entry_from_desc' [-Werror=implicit-function-declaration]
 1217 |         hv_set_msi_entry_from_desc(&params->int_entry.msi_entry, msi_desc);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~

A PCI driver should never depend on a particular host bridge
implementation in the first place, but if we have this dependency
it's better to express it as a 'depends on' rather than 'select'.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/microsoft/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/microsoft/Kconfig b/drivers/net/ethernet/microsoft/Kconfig
index e1ac0a5d808d..fe4e7a7d9c0b 100644
--- a/drivers/net/ethernet/microsoft/Kconfig
+++ b/drivers/net/ethernet/microsoft/Kconfig
@@ -18,7 +18,7 @@ if NET_VENDOR_MICROSOFT
 config MICROSOFT_MANA
 	tristate "Microsoft Azure Network Adapter (MANA) support"
 	depends on PCI_MSI && X86_64
-	select PCI_HYPERV
+	depends on PCI_HYPERV
 	help
 	  This driver supports Microsoft Azure Network Adapter (MANA).
 	  So far, the driver is only supported on X86_64.
-- 
2.29.2


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

* RE: [PATCH] net: mana: fix PCI_HYPERV dependency
  2021-04-22 13:34 [PATCH] net: mana: fix PCI_HYPERV dependency Arnd Bergmann
@ 2021-04-22 17:27 ` Dexuan Cui
  2021-04-22 20:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Dexuan Cui @ 2021-04-22 17:27 UTC (permalink / raw)
  To: Arnd Bergmann, KY Srinivasan, Haiyang Zhang, Stephen Hemminger,
	Wei Liu, David S. Miller, Jakub Kicinski
  Cc: Arnd Bergmann, Shachar Raindel, linux-hyperv, netdev, linux-kernel

> From: Arnd Bergmann <arnd@kernel.org>
> Sent: Thursday, April 22, 2021 6:35 AM
>  ...
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The MANA driver causes a build failure in some configurations when
> it selects an unavailable symbol:
> 
> WARNING: unmet direct dependencies detected for PCI_HYPERV
>   Depends on [n]: PCI [=y] && X86_64 [=y] && HYPERV [=n] && PCI_MSI [=y]
> && PCI_MSI_IRQ_DOMAIN [=y] && SYSFS [=y]
>   Selected by [y]:
>   - MICROSOFT_MANA [=y] && NETDEVICES [=y] && ETHERNET [=y] &&
> NET_VENDOR_MICROSOFT [=y] && PCI_MSI [=y] && X86_64 [=y]
> drivers/pci/controller/pci-hyperv.c: In function 'hv_irq_unmask':
> drivers/pci/controller/pci-hyperv.c:1217:9: error: implicit declaration of
> function 'hv_set_msi_entry_from_desc'
> [-Werror=implicit-function-declaration]
>  1217 |
> hv_set_msi_entry_from_desc(&params->int_entry.msi_entry, msi_desc);
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> A PCI driver should never depend on a particular host bridge
> implementation in the first place, but if we have this dependency
> it's better to express it as a 'depends on' rather than 'select'.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Dexuan Cui <decui@microsoft.com>


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

* Re: [PATCH] net: mana: fix PCI_HYPERV dependency
  2021-04-22 13:34 [PATCH] net: mana: fix PCI_HYPERV dependency Arnd Bergmann
  2021-04-22 17:27 ` Dexuan Cui
@ 2021-04-22 20:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-04-22 20:30 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: kys, haiyangz, sthemmin, wei.liu, decui, davem, kuba, arnd,
	shacharr, linux-hyperv, netdev, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Thu, 22 Apr 2021 15:34:34 +0200 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The MANA driver causes a build failure in some configurations when
> it selects an unavailable symbol:
> 
> WARNING: unmet direct dependencies detected for PCI_HYPERV
>   Depends on [n]: PCI [=y] && X86_64 [=y] && HYPERV [=n] && PCI_MSI [=y] && PCI_MSI_IRQ_DOMAIN [=y] && SYSFS [=y]
>   Selected by [y]:
>   - MICROSOFT_MANA [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_MICROSOFT [=y] && PCI_MSI [=y] && X86_64 [=y]
> drivers/pci/controller/pci-hyperv.c: In function 'hv_irq_unmask':
> drivers/pci/controller/pci-hyperv.c:1217:9: error: implicit declaration of function 'hv_set_msi_entry_from_desc' [-Werror=implicit-function-declaration]
>  1217 |         hv_set_msi_entry_from_desc(&params->int_entry.msi_entry, msi_desc);
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> [...]

Here is the summary with links:
  - net: mana: fix PCI_HYPERV dependency
    https://git.kernel.org/netdev/net-next/c/45b102dd8149

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-04-22 20:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22 13:34 [PATCH] net: mana: fix PCI_HYPERV dependency Arnd Bergmann
2021-04-22 17:27 ` Dexuan Cui
2021-04-22 20:30 ` patchwork-bot+netdevbpf

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).