Skip to content

Commit b43990b

Browse files
arinc9kuba-moo
authored andcommitted
net: dsa: mt7530: do not clear config->supported_interfaces
There's no need to clear the config->supported_interfaces bitmap before reporting the supported interfaces as all bits in the bitmap will already be initialized to zero when the phylink_config structure is allocated. The "config" pointer points to &dp->phylink_config, and "dp" is allocated by dsa_port_touch() with kzalloc(), so all its fields are filled with zeroes. There's no code that would change the bitmap beforehand. Remove it. Acked-by: Daniel Golle <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Reviewed-by: Russell King (Oracle) <[email protected]> Signed-off-by: Arınç ÜNAL <[email protected]> Link: https://lore.kernel.org/r/20240206-for-netnext-mt7530-improvements-2-v5-7-d7d92a185cb1@arinc9.com Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c9d70a1 commit b43990b

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/net/dsa/mt7530.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2573,8 +2573,6 @@ static void mt7531_mac_port_get_caps(struct dsa_switch *ds, int port,
25732573
static void mt7988_mac_port_get_caps(struct dsa_switch *ds, int port,
25742574
struct phylink_config *config)
25752575
{
2576-
phy_interface_zero(config->supported_interfaces);
2577-
25782576
switch (port) {
25792577
/* Ports which are connected to switch PHYs. There is no MII pinout. */
25802578
case 0 ... 3:

0 commit comments

Comments
 (0)