The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [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'?
@ 2025-04-04 17:04 kernel test robot
  2025-04-04 17:48 ` Nam Cao
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2025-04-04 17:04 UTC (permalink / raw)
  To: Nam Cao; +Cc: oe-kbuild-all, linux-kernel, x86, Thomas Gleixner

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@intel.com/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@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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504050126.K62Di5RY-lkp@intel.com/

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@intel.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* 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'?
  2025-04-04 17:04 [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'? kernel test robot
@ 2025-04-04 17:48 ` Nam Cao
  2025-04-04 17:51   ` Nam Cao
  2025-04-04 17:52   ` Thomas Gleixner
  0 siblings, 2 replies; 4+ messages in thread
From: Nam Cao @ 2025-04-04 17:48 UTC (permalink / raw)
  To: kernel test robot; +Cc: oe-kbuild-all, linux-kernel, x86, Thomas Gleixner

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@intel.com/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@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 <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202504050126.K62Di5RY-lkp@intel.com/
> 
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* 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'?
  2025-04-04 17:48 ` Nam Cao
@ 2025-04-04 17:51   ` Nam Cao
  2025-04-04 17:52   ` Thomas Gleixner
  1 sibling, 0 replies; 4+ messages in thread
From: Nam Cao @ 2025-04-04 17:51 UTC (permalink / raw)
  To: kernel test robot; +Cc: oe-kbuild-all, linux-kernel, x86, Thomas Gleixner

On Fri, Apr 04, 2025 at 07:48:56PM +0200, Nam Cao wrote:
> 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()

Never mind, I see you have already fixed it up.

Best regards,
Nam

^ permalink raw reply	[flat|nested] 4+ messages in thread

* 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'?
  2025-04-04 17:48 ` Nam Cao
  2025-04-04 17:51   ` Nam Cao
@ 2025-04-04 17:52   ` Thomas Gleixner
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2025-04-04 17:52 UTC (permalink / raw)
  To: Nam Cao, kernel test robot; +Cc: oe-kbuild-all, linux-kernel, x86

On Fri, Apr 04 2025 at 19:48, Nam Cao wrote:

> 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@intel.com/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@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 <lkp@intel.com>
>> | Closes: https://lore.kernel.org/oe-kbuild-all/202504050126.K62Di5RY-lkp@intel.com/
>> 
>> 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()

It's already fixed in the timers/cleanup branch

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-04-04 17:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-04 17:04 [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'? kernel test robot
2025-04-04 17:48 ` Nam Cao
2025-04-04 17:51   ` Nam Cao
2025-04-04 17:52   ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox