Re: [PATCH net-next v10 7/7] net: dsa: motorcomm: Add support for Motorcomm YT922x
From: David Yang
Date: Thu Oct 01 2026 - 20:34:58 EST
On Tue, Sep 29, 2026 at 10:54 AM Kyle Switch <kyle.switch@xxxxxxxxxxxxxx> wrote:
> +static int
> +yt922x_port_up(struct yt921x_priv *priv, int port, unsigned int mode,
> + phy_interface_t interface, int speed, int duplex,
> + bool tx_pause, bool rx_pause)
> +{
> + int ps = ethtool_speed_to_yt921x(speed);
> + u32 mask;
> + u32 ctrl;
> + int res;
> +
> + if (ps == YT921X_SPEED_INVALID)
> + return -EINVAL;
> + ctrl |= ps;
../drivers/net/dsa/motorcomm/chip.c:4500:2: warning: variable 'ctrl'
is uninitialized when used here [-Wuninitialized]
4500 | ctrl |= ps;
| ^~~~
../drivers/net/dsa/motorcomm/chip.c:4495:10: note: initialize the
variable 'ctrl' to silence this warning
4495 | u32 ctrl;
| ^
| = 0