Re: [PATCH] clocksource: Skip watchdog check for large watchdog intervals

From: kernel test robot
Date: Wed Jan 03 2024 - 19:47:31 EST


Hi Jiri,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tip/timers/core]
[also build test WARNING on linus/master v6.7-rc8 next-20240103]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Jiri-Wiesner/clocksource-Skip-watchdog-check-for-large-watchdog-intervals/20240103-192257
base: tip/timers/core
patch link: https://lore.kernel.org/r/20240103112113.GA6108%40incl
patch subject: [PATCH] clocksource: Skip watchdog check for large watchdog intervals
config: i386-buildonly-randconfig-001-20240104 (https://download.01.org/0day-ci/archive/20240104/202401040845.lHig8Ei0-lkp@xxxxxxxxx/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240104/202401040845.lHig8Ei0-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/202401040845.lHig8Ei0-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

In file included from include/linux/dev_printk.h:14:0,
from include/linux/device.h:15,
from kernel/time/clocksource.c:10:
kernel/time/clocksource.c: In function 'clocksource_watchdog':
>> kernel/time/clocksource.c:103:6: warning: integer overflow in expression [-Woverflow]
* NSEC_PER_SEC / HZ)
^
include/linux/compiler.h:77:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
kernel/time/clocksource.c:486:27: note: in expansion of macro 'WATCHDOG_INTR_MAX_NS'
if (unlikely(interval > WATCHDOG_INTR_MAX_NS)) {
^~~~~~~~~~~~~~~~~~~~


vim +103 kernel/time/clocksource.c

97
98 /*
99 * Interval: 0.5sec.
100 */
101 #define WATCHDOG_INTERVAL (HZ >> 1)
102 #define WATCHDOG_INTR_MAX_NS ((WATCHDOG_INTERVAL + (WATCHDOG_INTERVAL >> 1))\
> 103 * NSEC_PER_SEC / HZ)
104

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