Re: [PATCH net-next 4/5] dpll: zl3073x: Refactor DPLL initialization
From: kernel test robot <hidden>
Date: 2025-07-26 10:58:33
Also in:
linux-doc, lkml, llvm, oe-kbuild-all
Hi Ivan, kernel test robot noticed the following build warnings: [auto build test WARNING on net-next/main] url: https://github.com/intel-lab-lkp/linux/commits/Ivan-Vecera/dpll-zl3073x-Add-functions-to-access-hardware-registers/20250725-234600 base: net-next/main patch link: https://lore.kernel.org/r/20250725154136.1008132-5-ivecera%40redhat.com patch subject: [PATCH net-next 4/5] dpll: zl3073x: Refactor DPLL initialization config: i386-randconfig-001-20250726 (https://download.01.org/0day-ci/archive/20250726/202507261812.7458edBX-lkp@intel.com/config) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250726/202507261812.7458edBX-lkp@intel.com/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 [off-list ref] | Closes: https://lore.kernel.org/oe-kbuild-all/202507261812.7458edBX-lkp@intel.com/ (local) All warnings (new ones prefixed by >>):
quoted
drivers/dpll/zl3073x/core.c:994:3: warning: variable 'mask' is uninitialized when used here [-Wuninitialized]
994 | mask |= BIT(zldpll->id);
| ^~~~
drivers/dpll/zl3073x/core.c:972:25: note: initialize the variable 'mask' to silence this warning
972 | u8 dpll_meas_ctrl, mask;
| ^
| = '\0'
1 warning generated.
vim +/mask +994 drivers/dpll/zl3073x/core.c
958
959 /**
960 * zl3073x_dev_phase_meas_setup - setup phase offset measurement
961 * @zldev: pointer to zl3073x_dev structure
962 *
963 * Enable phase offset measurement block, set measurement averaging factor
964 * and enable DPLL-to-its-ref phase measurement for all DPLLs.
965 *
966 * Returns: 0 on success, <0 on error
967 */
968 static int
969 zl3073x_dev_phase_meas_setup(struct zl3073x_dev *zldev)
970 {
971 struct zl3073x_dpll *zldpll;
972 u8 dpll_meas_ctrl, mask;
973 int rc;
974
975 /* Read DPLL phase measurement control register */
976 rc = zl3073x_read_u8(zldev, ZL_REG_DPLL_MEAS_CTRL, &dpll_meas_ctrl);
977 if (rc)
978 return rc;
979
980 /* Setup phase measurement averaging factor */
981 dpll_meas_ctrl &= ~ZL_DPLL_MEAS_CTRL_AVG_FACTOR;
982 dpll_meas_ctrl |= FIELD_PREP(ZL_DPLL_MEAS_CTRL_AVG_FACTOR, 3);
983
984 /* Enable DPLL measurement block */
985 dpll_meas_ctrl |= ZL_DPLL_MEAS_CTRL_EN;
986
987 /* Update phase measurement control register */
988 rc = zl3073x_write_u8(zldev, ZL_REG_DPLL_MEAS_CTRL, dpll_meas_ctrl);
989 if (rc)
990 return rc;
991
992 /* Enable DPLL-to-connected-ref measurement for each channel */
993 list_for_each_entry(zldpll, &zldev->dplls, list)
> 994 mask |= BIT(zldpll->id);
995
996 return zl3073x_write_u8(zldev, ZL_REG_DPLL_PHASE_ERR_READ_MASK, mask);
997 }
998
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki