All of lore.kernel.org
 help / color / mirror / Atom feed
* [jlayton:mgtime 8/13] kernel/time/timekeeping_debug.c:66 timekeeping_get_mg_floor_swaps() warn: unsigned 'sum' is never less than zero.
@ 2024-09-24  8:04 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-09-24  8:04 UTC (permalink / raw)
  To: Jeff Layton; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git mgtime
head:   20490d956a00f097e09ed6d3073b6231aaa0195f
commit: 6135c3c69350e84fa9c43b8c1b23a3f61bebe852 [8/13] timekeeping: add percpu counter for tracking floor swap events
config: i386-randconfig-141-20240924 (https://download.01.org/0day-ci/archive/20240924/202409241549.UDfBa14A-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0

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/202409241549.UDfBa14A-lkp@intel.com/

smatch warnings:
kernel/time/timekeeping_debug.c:66 timekeeping_get_mg_floor_swaps() warn: unsigned 'sum' is never less than zero.

vim +/sum +66 kernel/time/timekeeping_debug.c

    58	
    59	unsigned long timekeeping_get_mg_floor_swaps(void)
    60	{
    61		int i;
    62		unsigned long sum = 0;
    63	
    64		for_each_possible_cpu(i)
    65			sum += per_cpu(timekeeping_mg_floor_swaps, i);
  > 66		return sum < 0 ? 0 : sum;
    67	}
    68	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-09-24  8:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-24  8:04 [jlayton:mgtime 8/13] kernel/time/timekeeping_debug.c:66 timekeeping_get_mg_floor_swaps() warn: unsigned 'sum' is never less than zero kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.