Subject: Re: [PATCH] net: sparx5: uses, depends on BRIDGE or !BRIDGE

From: Jakub Kicinski <[email-masked]>
Date: Tue, 29 Mar 2022 18:51:16 -0700

On Tue, 29 Mar 2022 18:20:25 -0700 Randy Dunlap wrote:
> Fix build errors when BRIDGE=m and SPARX5_SWITCH=y:
> 
> riscv64-linux-ld: drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.o: in function `.L305':
> sparx5_switchdev.c:(.text+0xdb0): undefined reference to `br_vlan_enabled'
> riscv64-linux-ld: drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.o: in function `.L283':
> sparx5_switchdev.c:(.text+0xee0): undefined reference to `br_vlan_enabled'
> 
> Fixes: 3cfa11bac9bb ("net: sparx5: add the basic sparx5 driver")
> Signed-off-by: Randy Dunlap <[email-masked]>
> Reported-by: kernel test robot <[email-masked]>
> Cc: Horatiu Vultur <[email-masked]>
> Cc: Lars Povlsen <[email-masked]>
> Cc: Steen Hegelund <[email-masked]>
> Cc: [email-masked]
> Cc: "David S. Miller" <[email-masked]>
> Cc: Jakub Kicinski <[email-masked]>
> Cc: Paolo Abeni <[email-masked]>

Gotta CC all the authors of the change under Fixes, please.
Adding them now.

> --- linux-next-20220329.orig/drivers/net/ethernet/microchip/sparx5/Kconfig
> +++ linux-next-20220329/drivers/net/ethernet/microchip/sparx5/Kconfig
> @@ -5,6 +5,7 @@ config SPARX5_SWITCH
>  	depends on OF
>  	depends on ARCH_SPARX5 || COMPILE_TEST
>  	depends on PTP_1588_CLOCK_OPTIONAL
> +	depends on BRIDGE || BRIDGE=n
>  	select PHYLINK
>  	select PHY_SPARX5_SERDES
>  	select RESET_CONTROLLER