[RFC PATCH net-next 8/8] net: dsa: mt7530: do not clear config->supported_interfaces

Vladimir Oltean olteanv at gmail.com
Mon Jan 15 13:46:29 PST 2024


On Sat, Jan 13, 2024 at 01:25:29PM +0300, Arınç ÜNAL wrote:
> 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.
> There's no code that would change the bitmap beforehand. Remove it.
> 
> Signed-off-by: Arınç ÜNAL <arinc.unal at arinc9.com>
> Acked-by: Daniel Golle <daniel at makrotopia.org>
> ---

Yes, 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.

Reviewed-by: Vladimir Oltean <olteanv at gmail.com>



More information about the Linux-mediatek mailing list