Re: [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: Nam Cao
Date: Fri Apr 04 2025 - 13:51:27 EST


On Sat, Apr 05, 2025 at 01:04:05AM +0800, kernel test robot wrote:
> 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

This new user of hrtimer_init() was recently added by c89755d1111f ("pps:
generators: Add PPS Generator TIO Driver").

git grep shows me there's also bf3624cf1c370 ("netdevsim: call
napi_schedule from a timer context") adding another hrtimer_init().

I will send patches converting them over to hrtimer_setup()

Best regards,
Nam