[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251105171848.550f625a@kernel.org>
Date: Wed, 5 Nov 2025 17:18:48 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
Cc: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>, Andrew Lunn
<andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, Eric
Dumazet <edumazet@...gle.com>, linux-arm-kernel@...ts.infradead.org,
linux-stm32@...md-mailman.stormreply.com, Maxime Coquelin
<mcoquelin.stm32@...il.com>, netdev@...r.kernel.org, Paolo Abeni
<pabeni@...hat.com>
Subject: Re: [PATCH net-next 09/11] net: stmmac: ingenic: simplify x2000
mac_set_mode()
On Wed, 05 Nov 2025 13:26:53 +0000 Russell King (Oracle) wrote:
> As per the previous commit, we have validated that the phy_intf_sel
> value is one that is permissible for this SoC, so there is no need to
> handle invalid PHY interface modes. We can also apply the other
> configuration based upon the phy_intf_sel value rather than the
> PHY interface mode.
clang sayeth:
drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c:128:13: warning: variable 'val' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
128 | } else if (phy_intf_sel == PHY_INTF_SEL_RGMII) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c:142:2: note: uninitialized use occurs here
142 | val |= FIELD_PREP(MACPHYC_PHY_INFT_MASK, phy_intf_sel);
| ^~~
drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c:128:9: note: remove the 'if' if its condition is always true
128 | } else if (phy_intf_sel == PHY_INTF_SEL_RGMII) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c:123:18: note: initialize the variable 'val' to silence this warning
123 | unsigned int val;
| ^
| = 0
--
pw-bot: cr
Powered by blists - more mailing lists