Hi David, kernel test robot noticed the following build errors: [auto build test ERROR on 6fb2fa9805c501d9ade047fc511961f3273cdcb5] url: https://github.com/intel-lab-lkp/linux/commits/David-Lechner/pwm-core-export-pwm_get_state_hw/20241030-052134 base: 6fb2fa9805c501d9ade047fc511961f3273cdcb5 patch link: https://lore.kernel.org/r/20241029-pwm-export-pwm_get_state_hw-v2-2-03ba063a3230%40baylibre.com patch subject: [PATCH v2 2/2] iio: adc: ad7606: finish pwm_get_state_hw() TODO config: i386-buildonly-randconfig-004-20241102 (https://download.01.org/0day-ci/archive/20241102/202411020416.BsBZy5XU-lkp@xxxxxxxxx/config) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241102/202411020416.BsBZy5XU-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/202411020416.BsBZy5XU-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): In file included from drivers/iio/adc/ad7606.c:17: In file included from include/linux/regulator/consumer.h:35: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:21: In file included from include/linux/mm.h:2225: include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ >> drivers/iio/adc/ad7606.c:765:9: error: call to undeclared function 'pwm_get_state_hw'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 765 | ret = pwm_get_state_hw(st->cnvst_pwm, &cnvst_pwm_state); | ^ drivers/iio/adc/ad7606.c:765:9: note: did you mean 'pwm_get_state'? include/linux/pwm.h:127:20: note: 'pwm_get_state' declared here 127 | static inline void pwm_get_state(const struct pwm_device *pwm, | ^ 1 warning and 1 error generated. vim +/pwm_get_state_hw +765 drivers/iio/adc/ad7606.c 733 734 static int ad7606_read_raw(struct iio_dev *indio_dev, 735 struct iio_chan_spec const *chan, 736 int *val, 737 int *val2, 738 long m) 739 { 740 int ret, ch = 0; 741 struct ad7606_state *st = iio_priv(indio_dev); 742 struct ad7606_chan_scale *cs; 743 struct pwm_state cnvst_pwm_state; 744 745 switch (m) { 746 case IIO_CHAN_INFO_RAW: 747 iio_device_claim_direct_scoped(return -EBUSY, indio_dev) { 748 ret = ad7606_scan_direct(indio_dev, chan->address, val); 749 if (ret < 0) 750 return ret; 751 return IIO_VAL_INT; 752 } 753 unreachable(); 754 case IIO_CHAN_INFO_SCALE: 755 if (st->sw_mode_en) 756 ch = chan->address; 757 cs = &st->chan_scales[ch]; 758 *val = cs->scale_avail[cs->range][0]; 759 *val2 = cs->scale_avail[cs->range][1]; 760 return IIO_VAL_INT_PLUS_MICRO; 761 case IIO_CHAN_INFO_OVERSAMPLING_RATIO: 762 *val = st->oversampling; 763 return IIO_VAL_INT; 764 case IIO_CHAN_INFO_SAMP_FREQ: > 765 ret = pwm_get_state_hw(st->cnvst_pwm, &cnvst_pwm_state); 766 if (ret < 0) 767 return ret; 768 *val = DIV_ROUND_CLOSEST_ULL(NSEC_PER_SEC, cnvst_pwm_state.period); 769 return IIO_VAL_INT; 770 } 771 return -EINVAL; 772 } 773 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki