diff mbox series

[net] net: marvell: prestera: fix compilation with CONFIG_BRIDGE=m

Message ID 20201106161128.24069-1-vadym.kochan@plvision.eu (mailing list archive)
State Accepted
Commit 4e0396c59559264442963b349ab71f66e471f84d
Delegated to: Netdev Maintainers
Headers show
Series [net] net: marvell: prestera: fix compilation with CONFIG_BRIDGE=m | expand

Commit Message

Vadym Kochan Nov. 6, 2020, 4:11 p.m. UTC
With CONFIG_BRIDGE=m the compilation fails:

    ld: drivers/net/ethernet/marvell/prestera/prestera_switchdev.o: in function `prestera_bridge_port_event':
    prestera_switchdev.c:(.text+0x2ebd): undefined reference to `br_vlan_enabled'

in case the driver is statically enabled.

Fix it by adding 'BRIDGE || BRIDGE=n' dependency.

Fixes: e1189d9a5fbe ("net: marvell: prestera: Add Switchdev driver implementation")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>
---
 drivers/net/ethernet/marvell/prestera/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Randy Dunlap Nov. 6, 2020, 8:13 p.m. UTC | #1
On 11/6/20 8:11 AM, Vadym Kochan wrote:
> With CONFIG_BRIDGE=m the compilation fails:
> 
>     ld: drivers/net/ethernet/marvell/prestera/prestera_switchdev.o: in function `prestera_bridge_port_event':
>     prestera_switchdev.c:(.text+0x2ebd): undefined reference to `br_vlan_enabled'
> 
> in case the driver is statically enabled.
> 
> Fix it by adding 'BRIDGE || BRIDGE=n' dependency.
> 
> Fixes: e1189d9a5fbe ("net: marvell: prestera: Add Switchdev driver implementation")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>


Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

Thanks.

> ---
>  drivers/net/ethernet/marvell/prestera/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/marvell/prestera/Kconfig b/drivers/net/ethernet/marvell/prestera/Kconfig
> index b1fcc44f566a..b6f20e2034c6 100644
> --- a/drivers/net/ethernet/marvell/prestera/Kconfig
> +++ b/drivers/net/ethernet/marvell/prestera/Kconfig
> @@ -6,6 +6,7 @@
>  config PRESTERA
>  	tristate "Marvell Prestera Switch ASICs support"
>  	depends on NET_SWITCHDEV && VLAN_8021Q
> +	depends on BRIDGE || BRIDGE=n
>  	select NET_DEVLINK
>  	help
>  	  This driver supports Marvell Prestera Switch ASICs family.
>
Jakub Kicinski Nov. 7, 2020, 8:45 p.m. UTC | #2
On Fri, 6 Nov 2020 12:13:12 -0800 Randy Dunlap wrote:
> On 11/6/20 8:11 AM, Vadym Kochan wrote:
> > With CONFIG_BRIDGE=m the compilation fails:
> > 
> >     ld: drivers/net/ethernet/marvell/prestera/prestera_switchdev.o: in function `prestera_bridge_port_event':
> >     prestera_switchdev.c:(.text+0x2ebd): undefined reference to `br_vlan_enabled'
> > 
> > in case the driver is statically enabled.
> > 
> > Fix it by adding 'BRIDGE || BRIDGE=n' dependency.
> > 
> > Fixes: e1189d9a5fbe ("net: marvell: prestera: Add Switchdev driver implementation")
> > Reported-by: Randy Dunlap <rdunlap@infradead.org>
> > Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>  
> 
> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

Applied, thanks!
patchwork-bot+netdevbpf@kernel.org Nov. 7, 2020, 8:50 p.m. UTC | #3
Hello:

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

On Fri,  6 Nov 2020 18:11:25 +0200 you wrote:
> With CONFIG_BRIDGE=m the compilation fails:
> 
>     ld: drivers/net/ethernet/marvell/prestera/prestera_switchdev.o: in function `prestera_bridge_port_event':
>     prestera_switchdev.c:(.text+0x2ebd): undefined reference to `br_vlan_enabled'
> 
> in case the driver is statically enabled.
> 
> [...]

Here is the summary with links:
  - [net] net: marvell: prestera: fix compilation with CONFIG_BRIDGE=m
    https://git.kernel.org/netdev/net/c/4e0396c59559

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

Patch

diff --git a/drivers/net/ethernet/marvell/prestera/Kconfig b/drivers/net/ethernet/marvell/prestera/Kconfig
index b1fcc44f566a..b6f20e2034c6 100644
--- a/drivers/net/ethernet/marvell/prestera/Kconfig
+++ b/drivers/net/ethernet/marvell/prestera/Kconfig
@@ -6,6 +6,7 @@ 
 config PRESTERA
 	tristate "Marvell Prestera Switch ASICs support"
 	depends on NET_SWITCHDEV && VLAN_8021Q
+	depends on BRIDGE || BRIDGE=n
 	select NET_DEVLINK
 	help
 	  This driver supports Marvell Prestera Switch ASICs family.