From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [android-common:android16-6.12-p3s 120/120] kernel/sched/fair.c:715 avg_vruntime() warn: inconsistent indenting
Date: Wed, 11 Nov 2026 21:57:07 +0100 [thread overview]
Message-ID: <202611112148.m4miUrmD-lkp@intel.com> (raw)
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
reply other threads:[~2026-11-11 20:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202611112148.m4miUrmD-lkp@intel.com \
--to=lkp@intel.com \
--cc=cros-kernel-buildreports@googlegroups.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.