Hi Krishna, kernel test robot noticed the following build warnings: [auto build test WARNING on 0ad2507d5d93f39619fc42372c347d6006b64319] url: https://github.com/intel-lab-lkp/linux/commits/Krishna-Chaitanya-Chundru/PCI-update-current-bus-speed-as-part-of-pci_bus_add_devices/20250217-144050 base: 0ad2507d5d93f39619fc42372c347d6006b64319 patch link: https://lore.kernel.org/r/20250217-mhi_bw_up-v1-4-9bad1e42bdb1%40oss.qualcomm.com patch subject: [PATCH 4/8] PCI: dwc: qcom: Update ICC & OPP votes based upon the requested speed config: powerpc64-randconfig-002-20250218 (https://download.01.org/0day-ci/archive/20250218/202502180859.1y6qqeIk-lkp@xxxxxxxxx/config) compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250218/202502180859.1y6qqeIk-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/202502180859.1y6qqeIk-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): >> drivers/pci/controller/dwc/pcie-qcom.c:1319:7: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (!IS_ERR(opp)) { ^~~~~~~~~~~~ drivers/pci/controller/dwc/pcie-qcom.c:1328:9: note: uninitialized use occurs here return ret; ^~~ drivers/pci/controller/dwc/pcie-qcom.c:1319:3: note: remove the 'if' if its condition is always true if (!IS_ERR(opp)) { ^~~~~~~~~~~~~~~~~~ drivers/pci/controller/dwc/pcie-qcom.c:1311:13: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] } else if (pcie->use_pm_opp) { ^~~~~~~~~~~~~~~~ drivers/pci/controller/dwc/pcie-qcom.c:1328:9: note: uninitialized use occurs here return ret; ^~~ drivers/pci/controller/dwc/pcie-qcom.c:1311:9: note: remove the 'if' if its condition is always true } else if (pcie->use_pm_opp) { ^~~~~~~~~~~~~~~~~~~~~~ drivers/pci/controller/dwc/pcie-qcom.c:1302:9: note: initialize the variable 'ret' to silence this warning int ret, freq_mbps; ^ = 0 2 warnings generated. vim +1319 drivers/pci/controller/dwc/pcie-qcom.c 1296 1297 static int qcom_pcie_set_icc_opp(struct qcom_pcie *pcie, int speed, int width) 1298 { 1299 struct dw_pcie *pci = pcie->pci; 1300 unsigned long freq_kbps; 1301 struct dev_pm_opp *opp; 1302 int ret, freq_mbps; 1303 1304 if (pcie->icc_mem) { 1305 ret = icc_set_bw(pcie->icc_mem, 0, 1306 width * QCOM_PCIE_LINK_SPEED_TO_BW(speed)); 1307 if (ret) { 1308 dev_err(pci->dev, "Failed to set bandwidth for PCIe-MEM interconnect path: %d\n", 1309 ret); 1310 } 1311 } else if (pcie->use_pm_opp) { 1312 freq_mbps = pcie_dev_speed_mbps(pcie_link_speed[speed]); 1313 if (freq_mbps < 0) 1314 return -EINVAL; 1315 1316 freq_kbps = freq_mbps * KILO; 1317 opp = dev_pm_opp_find_freq_exact(pci->dev, freq_kbps * width, 1318 true); > 1319 if (!IS_ERR(opp)) { 1320 ret = dev_pm_opp_set_opp(pci->dev, opp); 1321 if (ret) 1322 dev_err(pci->dev, "Failed to set OPP for freq (%lu): %d\n", 1323 freq_kbps * width, ret); 1324 dev_pm_opp_put(opp); 1325 } 1326 } 1327 1328 return ret; 1329 } 1330 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki