All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-common:android16-6.12-p3s 120/120] kernel/sched/fair.c:715 avg_vruntime() warn: inconsistent indenting
@ 2026-11-11 20:57 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-11-11 20:57 UTC (permalink / raw)
  To: cros-kernel-buildreports; +Cc: oe-kbuild-all

tree:   https://android.googlesource.com/kernel/common android16-6.12-p3s
head:   a0185ce3543f042a5f4d567e2b318314104ecac7
commit: 1eb5dc8d1c44e2bf7b36a101c62dad962d673a8b [120/120] UPSTREAM: sched/fair: Fix zero_vruntime tracking
config: arm64-randconfig-2200-20261110 (https://download.01.org/0day-ci/archive/20261111/202611112148.m4miUrmD-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 053b4a894ceaebc2eed76a7fa09f58cf7e313a69)
smatch: v0.5.0-9187-g5189e3fb

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/202611112148.m4miUrmD-lkp@intel.com/

smatch warnings:
kernel/sched/fair.c:715 avg_vruntime() warn: inconsistent indenting
kernel/sched/fair.c:697 update_zero_vruntime() warn: inconsistent indenting

vim +715 kernel/sched/fair.c

   689	
   690	static inline
   691	void update_zero_vruntime(struct cfs_rq *cfs_rq, s64 delta)
   692	{
   693		/*
   694		 * v' = v + d ==> avg_vruntime' = avg_vruntime - d*avg_load
   695		 */
   696		cfs_rq->avg_vruntime -= cfs_rq->avg_load * delta;
 > 697	       cfs_rq->zero_vruntime += delta;
   698	}
   699	
   700	/*
   701	 * Specifically: avg_vruntime() + 0 must result in entity_eligible() := true
   702	 * For this to be so, the result of this function must have a left bias.
   703	 *
   704	 * Called in:
   705	 *  - place_entity()      -- before enqueue
   706	 *  - update_entity_lag() -- before dequeue
   707	 *  - entity_tick()
   708	 *
   709	 * This means it is one entry 'behind' but that puts it close enough to where
   710	 * the bound on entity_key() is at most two lag bounds.
   711	 */
   712	u64 avg_vruntime(struct cfs_rq *cfs_rq)
   713	{
   714		struct sched_entity *curr = cfs_rq->curr;
 > 715	       long weight = cfs_rq->avg_load;
   716	       s64 delta = 0;
   717	
   718	       if (curr && !curr->on_rq)
   719	               curr = NULL;
   720	
   721	       if (weight) {
   722	               s64 runtime = cfs_rq->avg_vruntime;
   723	
   724	               if (curr) {
   725	                       unsigned long w = scale_load_down(curr->load.weight);
   726	
   727	                       runtime += entity_key(cfs_rq, curr) * w;
   728	                       weight += w;
   729	               }
   730	
   731			/* sign flips effective floor / ceiling */
   732	               if (runtime < 0)
   733	                       runtime -= (weight - 1);
   734	
   735	               delta = div_s64(runtime, weight);
   736	       } else if (curr) {
   737	               /*
   738	                * When there is but one element, it is the average.
   739	                */
   740	               delta = curr->vruntime - cfs_rq->zero_vruntime;
   741		}
   742	
   743	       update_zero_vruntime(cfs_rq, delta);
   744	
   745	       return cfs_rq->zero_vruntime;
   746	}
   747	

--
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:[~2026-11-11 20:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-11 20:57 [android-common:android16-6.12-p3s 120/120] kernel/sched/fair.c:715 avg_vruntime() warn: inconsistent indenting 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.