Re: [PATCH net-next 4/6] dpll: zl3073x: Cache all reference properties in zl3073x_ref
From: kernel test robot
Date: Tue Nov 11 2025 - 01:54:31 EST
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-Store-raw-register-values-instead-of-parsed-state/20251111-020236
base: net-next/main
patch link: https://lore.kernel.org/r/20251110175818.1571610-5-ivecera%40redhat.com
patch subject: [PATCH net-next 4/6] dpll: zl3073x: Cache all reference properties in zl3073x_ref
config: x86_64-randconfig-161-20251111 (https://download.01.org/0day-ci/archive/20251111/202511111402.yEyMEeLb-lkp@xxxxxxxxx/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251111/202511111402.yEyMEeLb-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/202511111402.yEyMEeLb-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
drivers/dpll/zl3073x/dpll.c: In function 'zl3073x_dpll_pin_phase_offset_check':
>> drivers/dpll/zl3073x/dpll.c:1850:35: warning: variable 'ref' set but not used [-Wunused-but-set-variable]
1850 | const struct zl3073x_ref *ref;
| ^~~
vim +/ref +1850 drivers/dpll/zl3073x/dpll.c
1836
1837 /**
1838 * zl3073x_dpll_pin_phase_offset_check - check for pin phase offset change
1839 * @pin: pin to check
1840 *
1841 * Check for the change of DPLL to connected pin phase offset change.
1842 *
1843 * Return: true on phase offset change, false otherwise
1844 */
1845 static bool
1846 zl3073x_dpll_pin_phase_offset_check(struct zl3073x_dpll_pin *pin)
1847 {
1848 struct zl3073x_dpll *zldpll = pin->dpll;
1849 struct zl3073x_dev *zldev = zldpll->dev;
> 1850 const struct zl3073x_ref *ref;
1851 unsigned int reg;
1852 s64 phase_offset;
1853 u8 ref_id;
1854 int rc;
1855
1856 ref_id = zl3073x_input_pin_ref_get(pin->id);
1857 ref = zl3073x_ref_state_get(zldev, ref_id);
1858
1859 /* No phase offset if the ref monitor reports signal errors */
1860 if (!zl3073x_dev_ref_is_status_ok(zldev, ref_id))
1861 return false;
1862
1863 /* Select register to read phase offset value depending on pin and
1864 * phase monitor state:
1865 * 1) For connected pin use dpll_phase_err_data register
1866 * 2) For other pins use appropriate ref_phase register if the phase
1867 * monitor feature is enabled.
1868 */
1869 if (pin->pin_state == DPLL_PIN_STATE_CONNECTED)
1870 reg = ZL_REG_DPLL_PHASE_ERR_DATA(zldpll->id);
1871 else if (zldpll->phase_monitor)
1872 reg = ZL_REG_REF_PHASE(ref_id);
1873 else
1874 return false;
1875
1876 /* Read measured phase offset value */
1877 rc = zl3073x_read_u48(zldev, reg, &phase_offset);
1878 if (rc) {
1879 dev_err(zldev->dev, "Failed to read ref phase offset: %pe\n",
1880 ERR_PTR(rc));
1881
1882 return false;
1883 }
1884
1885 /* Convert to ps */
1886 phase_offset = div_s64(sign_extend64(phase_offset, 47), 100);
1887
1888 /* Compare with previous value */
1889 if (phase_offset != pin->phase_offset) {
1890 dev_dbg(zldev->dev, "%s phase offset changed: %lld -> %lld\n",
1891 pin->label, pin->phase_offset, phase_offset);
1892 pin->phase_offset = phase_offset;
1893
1894 return true;
1895 }
1896
1897 return false;
1898 }
1899
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki