Message ID | 20220519213351.9020-1-rdunlap@infradead.org (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: dsa: restrict SMSC_LAN9303_I2C kconfig | expand |
Hi Randy, On Thu, May 19, 2022 at 02:33:51PM -0700, Randy Dunlap wrote: > Since kconfig 'select' does not follow dependency chains, if symbol KSA > selects KSB, then KSA should also depend on the same symbols that KSB > depends on, in order to prevent Kconfig warnings and possible build > errors. > > Change NET_DSA_SMSC_LAN9303_I2C so that it is limited to VLAN_8021Q if > the latter is enabled and results in changing NET_DSA_SMSC_LAN9303_I2C > from =y to =m and eliminating the kconfig warning. > > WARNING: unmet direct dependencies detected for NET_DSA_SMSC_LAN9303 > Depends on [m]: NETDEVICES [=y] && NET_DSA [=y] && (VLAN_8021Q [=m] || VLAN_8021Q [=m]=n) > Selected by [y]: > - NET_DSA_SMSC_LAN9303_I2C [=y] && NETDEVICES [=y] && NET_DSA [=y] && I2C [=y] > > Fixes: be4e119f9914 ("net: dsa: LAN9303: add I2C managed mode support") The Fixes: tag is incorrect. It should be: Fixes: 430065e26719 ("net: dsa: lan9303: add VLAN IDs to master device") > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > Cc: Andrew Lunn <andrew@lunn.ch> > Cc: Vivien Didelot <vivien.didelot@gmail.com> > Cc: Florian Fainelli <f.fainelli@gmail.com> > Cc: Vladimir Oltean <olteanv@gmail.com> > Cc: Juergen Borleis <jbe@pengutronix.de> > Cc: "David S. Miller" <davem@davemloft.net> > Cc: Eric Dumazet <edumazet@google.com> > Cc: Jakub Kicinski <kuba@kernel.org> > Cc: Paolo Abeni <pabeni@redhat.com> > --- > drivers/net/dsa/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > --- a/drivers/net/dsa/Kconfig > +++ b/drivers/net/dsa/Kconfig > @@ -82,6 +82,7 @@ config NET_DSA_SMSC_LAN9303 > config NET_DSA_SMSC_LAN9303_I2C > tristate "SMSC/Microchip LAN9303 3-ports 10/100 ethernet switch in I2C managed mode" > depends on I2C > + depends on VLAN_8021Q || VLAN_8021Q=n I'm pretty sure that NET_DSA_SMSC_LAN9303_MDIO needs the same treatment as NET_DSA_SMSC_LAN9303_I2C. And the "depends" line can now be removed from NET_DSA_SMSC_LAN9303, it serves no purpose. > select NET_DSA_SMSC_LAN9303 > select REGMAP_I2C > help
Hi, On 5/19/22 16:09, Vladimir Oltean wrote: > Hi Randy, > > On Thu, May 19, 2022 at 02:33:51PM -0700, Randy Dunlap wrote: >> Since kconfig 'select' does not follow dependency chains, if symbol KSA >> selects KSB, then KSA should also depend on the same symbols that KSB >> depends on, in order to prevent Kconfig warnings and possible build >> errors. >> >> Change NET_DSA_SMSC_LAN9303_I2C so that it is limited to VLAN_8021Q if >> the latter is enabled and results in changing NET_DSA_SMSC_LAN9303_I2C >> from =y to =m and eliminating the kconfig warning. >> >> WARNING: unmet direct dependencies detected for NET_DSA_SMSC_LAN9303 >> Depends on [m]: NETDEVICES [=y] && NET_DSA [=y] && (VLAN_8021Q [=m] || VLAN_8021Q [=m]=n) >> Selected by [y]: >> - NET_DSA_SMSC_LAN9303_I2C [=y] && NETDEVICES [=y] && NET_DSA [=y] && I2C [=y] >> >> Fixes: be4e119f9914 ("net: dsa: LAN9303: add I2C managed mode support") > > The Fixes: tag is incorrect. It should be: > > Fixes: 430065e26719 ("net: dsa: lan9303: add VLAN IDs to master device") Corrected. Thanks. > >> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> >> Cc: Andrew Lunn <andrew@lunn.ch> >> Cc: Vivien Didelot <vivien.didelot@gmail.com> >> Cc: Florian Fainelli <f.fainelli@gmail.com> >> Cc: Vladimir Oltean <olteanv@gmail.com> >> Cc: Juergen Borleis <jbe@pengutronix.de> >> Cc: "David S. Miller" <davem@davemloft.net> >> Cc: Eric Dumazet <edumazet@google.com> >> Cc: Jakub Kicinski <kuba@kernel.org> >> Cc: Paolo Abeni <pabeni@redhat.com> >> --- >> drivers/net/dsa/Kconfig | 1 + >> 1 file changed, 1 insertion(+) >> >> --- a/drivers/net/dsa/Kconfig >> +++ b/drivers/net/dsa/Kconfig >> @@ -82,6 +82,7 @@ config NET_DSA_SMSC_LAN9303 >> config NET_DSA_SMSC_LAN9303_I2C >> tristate "SMSC/Microchip LAN9303 3-ports 10/100 ethernet switch in I2C managed mode" >> depends on I2C >> + depends on VLAN_8021Q || VLAN_8021Q=n > > I'm pretty sure that NET_DSA_SMSC_LAN9303_MDIO needs the same treatment > as NET_DSA_SMSC_LAN9303_I2C. And the "depends" line can now be removed > from NET_DSA_SMSC_LAN9303, it serves no purpose. Ok, v2 on the way. >> select NET_DSA_SMSC_LAN9303 >> select REGMAP_I2C >> help
--- a/drivers/net/dsa/Kconfig +++ b/drivers/net/dsa/Kconfig @@ -82,6 +82,7 @@ config NET_DSA_SMSC_LAN9303 config NET_DSA_SMSC_LAN9303_I2C tristate "SMSC/Microchip LAN9303 3-ports 10/100 ethernet switch in I2C managed mode" depends on I2C + depends on VLAN_8021Q || VLAN_8021Q=n select NET_DSA_SMSC_LAN9303 select REGMAP_I2C help
Since kconfig 'select' does not follow dependency chains, if symbol KSA selects KSB, then KSA should also depend on the same symbols that KSB depends on, in order to prevent Kconfig warnings and possible build errors. Change NET_DSA_SMSC_LAN9303_I2C so that it is limited to VLAN_8021Q if the latter is enabled and results in changing NET_DSA_SMSC_LAN9303_I2C from =y to =m and eliminating the kconfig warning. WARNING: unmet direct dependencies detected for NET_DSA_SMSC_LAN9303 Depends on [m]: NETDEVICES [=y] && NET_DSA [=y] && (VLAN_8021Q [=m] || VLAN_8021Q [=m]=n) Selected by [y]: - NET_DSA_SMSC_LAN9303_I2C [=y] && NETDEVICES [=y] && NET_DSA [=y] && I2C [=y] Fixes: be4e119f9914 ("net: dsa: LAN9303: add I2C managed mode support") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Vivien Didelot <vivien.didelot@gmail.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Vladimir Oltean <olteanv@gmail.com> Cc: Juergen Borleis <jbe@pengutronix.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: Eric Dumazet <edumazet@google.com> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Paolo Abeni <pabeni@redhat.com> --- drivers/net/dsa/Kconfig | 1 + 1 file changed, 1 insertion(+)