Hi Christophe, kernel test robot noticed the following build warnings: [auto build test WARNING on cd0057ad75116bacf16fea82e48c1db642971136] url: https://github.com/intel-lab-lkp/linux/commits/Christophe-Roullier/dt-bindings-net-add-STM32MP13-compatible-in-documentation-for-stm32/20240604-224324 base: cd0057ad75116bacf16fea82e48c1db642971136 patch link: https://lore.kernel.org/r/20240604143502.154463-8-christophe.roullier%40foss.st.com patch subject: [PATCH v4 07/11] net: ethernet: stmmac: add management of stm32mp13 for stm32 config: arm-defconfig (https://download.01.org/0day-ci/archive/20240605/202406050248.rGgTkevY-lkp@xxxxxxxxx/config) compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240605/202406050248.rGgTkevY-lkp@xxxxxxxxx/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202406050248.rGgTkevY-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): >> drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c:239:4: warning: variable 'val' is uninitialized when used here [-Wuninitialized] val |= SYSCFG_PMCR_ETH_SEL_MII; ^~~ drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c:228:9: note: initialize the variable 'val' to silence this warning int val; ^ = 0 1 warning generated. vim +/val +239 drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c 223 224 static int stm32mp1_configure_pmcr(struct plat_stmmacenet_data *plat_dat) 225 { 226 struct stm32_dwmac *dwmac = plat_dat->bsp_priv; 227 u32 reg = dwmac->mode_reg; 228 int val; 229 230 switch (plat_dat->mac_interface) { 231 case PHY_INTERFACE_MODE_MII: 232 /* 233 * STM32MP15xx supports both MII and GMII, STM32MP13xx MII only. 234 * SYSCFG_PMCSETR ETH_SELMII is present only on STM32MP15xx and 235 * acts as a selector between 0:GMII and 1:MII. As STM32MP13xx 236 * supports only MII, ETH_SELMII is not present. 237 */ 238 if (!dwmac->is_mp13) /* Select MII mode on STM32MP15xx */ > 239 val |= SYSCFG_PMCR_ETH_SEL_MII; 240 break; 241 case PHY_INTERFACE_MODE_GMII: 242 val = SYSCFG_PMCR_ETH_SEL_GMII; 243 if (dwmac->enable_eth_ck) 244 val |= SYSCFG_PMCR_ETH_CLK_SEL; 245 break; 246 case PHY_INTERFACE_MODE_RMII: 247 val = SYSCFG_PMCR_ETH_SEL_RMII; 248 if (dwmac->enable_eth_ck) 249 val |= SYSCFG_PMCR_ETH_REF_CLK_SEL; 250 break; 251 case PHY_INTERFACE_MODE_RGMII: 252 case PHY_INTERFACE_MODE_RGMII_ID: 253 case PHY_INTERFACE_MODE_RGMII_RXID: 254 case PHY_INTERFACE_MODE_RGMII_TXID: 255 val = SYSCFG_PMCR_ETH_SEL_RGMII; 256 if (dwmac->enable_eth_ck) 257 val |= SYSCFG_PMCR_ETH_CLK_SEL; 258 break; 259 default: 260 dev_err(dwmac->dev, "Mode %s not supported", 261 phy_modes(plat_dat->mac_interface)); 262 /* Do not manage others interfaces */ 263 return -EINVAL; 264 } 265 266 dev_dbg(dwmac->dev, "Mode %s", phy_modes(plat_dat->mac_interface)); 267 268 /* Shift value at correct ethernet MAC offset in SYSCFG_PMCSETR */ 269 val <<= ffs(dwmac->mode_mask) - ffs(SYSCFG_MP1_ETH_MASK); 270 271 /* Need to update PMCCLRR (clear register) */ 272 regmap_write(dwmac->regmap, dwmac->ops->syscfg_clr_off, 273 dwmac->mode_mask); 274 275 /* Update PMCSETR (set register) */ 276 return regmap_update_bits(dwmac->regmap, reg, 277 dwmac->mode_mask, val); 278 } 279 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki