[tip:timers/cleanups 2/10] drivers/pps/generators/pps_gen_tio.c:230:9: error: implicit declaration of function 'hrtimer_init'; did you mean 'hrtimers_init'?

From: kernel test robot
Date: Fri Apr 04 2025 - 13:05:52 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/cleanups
head: 5c4da3a96bf484f965057c281f1ef48ac46987bc
commit: 58b3f2cce01bb48b6f6e0c1cdca5e5a2fc0c56ad [2/10] hrtimers: Delete hrtimer_init()
config: i386-buildonly-randconfig-002-20250404 (https://download.01.org/0day-ci/archive/20250405/202504050126.K62Di5RY-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250405/202504050126.K62Di5RY-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/202504050126.K62Di5RY-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

drivers/pps/generators/pps_gen_tio.c: In function 'pps_gen_tio_probe':
>> drivers/pps/generators/pps_gen_tio.c:230:9: error: implicit declaration of function 'hrtimer_init'; did you mean 'hrtimers_init'? [-Werror=implicit-function-declaration]
230 | hrtimer_init(&tio->timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
| ^~~~~~~~~~~~
| hrtimers_init
cc1: some warnings being treated as errors


vim +230 drivers/pps/generators/pps_gen_tio.c

c89755d1111fa17 Subramanian Mohan 2025-02-19 199
c89755d1111fa17 Subramanian Mohan 2025-02-19 200 static int pps_gen_tio_probe(struct platform_device *pdev)
c89755d1111fa17 Subramanian Mohan 2025-02-19 201 {
c89755d1111fa17 Subramanian Mohan 2025-02-19 202 struct device *dev = &pdev->dev;
c89755d1111fa17 Subramanian Mohan 2025-02-19 203 struct pps_tio *tio;
c89755d1111fa17 Subramanian Mohan 2025-02-19 204
c89755d1111fa17 Subramanian Mohan 2025-02-19 205 if (!(cpu_feature_enabled(X86_FEATURE_TSC_KNOWN_FREQ) &&
c89755d1111fa17 Subramanian Mohan 2025-02-19 206 cpu_feature_enabled(X86_FEATURE_ART))) {
c89755d1111fa17 Subramanian Mohan 2025-02-19 207 dev_warn(dev, "TSC/ART is not enabled");
c89755d1111fa17 Subramanian Mohan 2025-02-19 208 return -ENODEV;
c89755d1111fa17 Subramanian Mohan 2025-02-19 209 }
c89755d1111fa17 Subramanian Mohan 2025-02-19 210
c89755d1111fa17 Subramanian Mohan 2025-02-19 211 tio = devm_kzalloc(dev, sizeof(*tio), GFP_KERNEL);
c89755d1111fa17 Subramanian Mohan 2025-02-19 212 if (!tio)
c89755d1111fa17 Subramanian Mohan 2025-02-19 213 return -ENOMEM;
c89755d1111fa17 Subramanian Mohan 2025-02-19 214
c89755d1111fa17 Subramanian Mohan 2025-02-19 215 tio->gen_info.use_system_clock = true;
c89755d1111fa17 Subramanian Mohan 2025-02-19 216 tio->gen_info.enable = pps_tio_gen_enable;
c89755d1111fa17 Subramanian Mohan 2025-02-19 217 tio->gen_info.get_time = pps_tio_get_time;
c89755d1111fa17 Subramanian Mohan 2025-02-19 218 tio->gen_info.owner = THIS_MODULE;
c89755d1111fa17 Subramanian Mohan 2025-02-19 219
c89755d1111fa17 Subramanian Mohan 2025-02-19 220 tio->pps_gen = pps_gen_register_source(&tio->gen_info);
c89755d1111fa17 Subramanian Mohan 2025-02-19 221 if (IS_ERR(tio->pps_gen))
c89755d1111fa17 Subramanian Mohan 2025-02-19 222 return PTR_ERR(tio->pps_gen);
c89755d1111fa17 Subramanian Mohan 2025-02-19 223
c89755d1111fa17 Subramanian Mohan 2025-02-19 224 tio->dev = dev;
c89755d1111fa17 Subramanian Mohan 2025-02-19 225 tio->base = devm_platform_ioremap_resource(pdev, 0);
c89755d1111fa17 Subramanian Mohan 2025-02-19 226 if (IS_ERR(tio->base))
c89755d1111fa17 Subramanian Mohan 2025-02-19 227 return PTR_ERR(tio->base);
c89755d1111fa17 Subramanian Mohan 2025-02-19 228
c89755d1111fa17 Subramanian Mohan 2025-02-19 229 pps_tio_disable(tio);
c89755d1111fa17 Subramanian Mohan 2025-02-19 @230 hrtimer_init(&tio->timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
c89755d1111fa17 Subramanian Mohan 2025-02-19 231 tio->timer.function = hrtimer_callback;
c89755d1111fa17 Subramanian Mohan 2025-02-19 232 spin_lock_init(&tio->lock);
c89755d1111fa17 Subramanian Mohan 2025-02-19 233 platform_set_drvdata(pdev, &tio);
c89755d1111fa17 Subramanian Mohan 2025-02-19 234
c89755d1111fa17 Subramanian Mohan 2025-02-19 235 return 0;
c89755d1111fa17 Subramanian Mohan 2025-02-19 236 }
c89755d1111fa17 Subramanian Mohan 2025-02-19 237

:::::: The code at line 230 was first introduced by commit
:::::: c89755d1111fa17ecfb69b50c336778a2d37dae4 pps: generators: Add PPS Generator TIO Driver

:::::: TO: Subramanian Mohan <subramanian.mohan@xxxxxxxxx>
:::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki