Re: [RFC PATCH net-next 8/8] net: dsa: mt7530: do not clear config->supported_interfaces
From: Vladimir Oltean
Date: Mon Jan 15 2024 - 16:46:47 EST
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@xxxxxxxxxx>
> Acked-by: Daniel Golle <daniel@xxxxxxxxxxxxxx>
> ---
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@xxxxxxxxx>