* [tip:locking/core 1/3] kernel/sched/core.c:10713 cpu_uclamp_print() error: uninitialized symbol 'util_clamp'.
@ 2023-11-29 12:01 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-11-29 12:01 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
CC: x86@kernel.org
TO: Peter Zijlstra <peterz@infradead.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
head: 18caaedaf4c3712ab6821f292598a8f86e6d7972
commit: e4ab322fbaaaf84b23d6cb0e3317a7f68baf36dc [1/3] cleanup: Add conditional guard support
:::::: branch date: 2 days ago
:::::: commit date: 2 weeks ago
config: mips-randconfig-r081-20231129 (https://download.01.org/0day-ci/archive/20231129/202311291930.SXx3ynxt-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231129/202311291930.SXx3ynxt-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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202311291930.SXx3ynxt-lkp@intel.com/
smatch warnings:
kernel/sched/core.c:10713 cpu_uclamp_print() error: uninitialized symbol 'util_clamp'.
kernel/sched/core.c:10718 cpu_uclamp_print() error: potentially dereferencing uninitialized 'tg'.
vim +/util_clamp +10713 kernel/sched/core.c
2480c093130f64 Patrick Bellasi 2019-08-22 10699
2480c093130f64 Patrick Bellasi 2019-08-22 10700 static inline void cpu_uclamp_print(struct seq_file *sf,
2480c093130f64 Patrick Bellasi 2019-08-22 10701 enum uclamp_id clamp_id)
2480c093130f64 Patrick Bellasi 2019-08-22 10702 {
2480c093130f64 Patrick Bellasi 2019-08-22 10703 struct task_group *tg;
2480c093130f64 Patrick Bellasi 2019-08-22 10704 u64 util_clamp;
2480c093130f64 Patrick Bellasi 2019-08-22 10705 u64 percent;
2480c093130f64 Patrick Bellasi 2019-08-22 10706 u32 rem;
2480c093130f64 Patrick Bellasi 2019-08-22 10707
0e34600ac9317d Peter Zijlstra 2023-06-09 10708 scoped_guard (rcu) {
2480c093130f64 Patrick Bellasi 2019-08-22 10709 tg = css_tg(seq_css(sf));
2480c093130f64 Patrick Bellasi 2019-08-22 10710 util_clamp = tg->uclamp_req[clamp_id].value;
0e34600ac9317d Peter Zijlstra 2023-06-09 10711 }
2480c093130f64 Patrick Bellasi 2019-08-22 10712
2480c093130f64 Patrick Bellasi 2019-08-22 @10713 if (util_clamp == SCHED_CAPACITY_SCALE) {
2480c093130f64 Patrick Bellasi 2019-08-22 10714 seq_puts(sf, "max\n");
2480c093130f64 Patrick Bellasi 2019-08-22 10715 return;
2480c093130f64 Patrick Bellasi 2019-08-22 10716 }
2480c093130f64 Patrick Bellasi 2019-08-22 10717
2480c093130f64 Patrick Bellasi 2019-08-22 @10718 percent = tg->uclamp_pct[clamp_id];
2480c093130f64 Patrick Bellasi 2019-08-22 10719 percent = div_u64_rem(percent, POW10(UCLAMP_PERCENT_SHIFT), &rem);
2480c093130f64 Patrick Bellasi 2019-08-22 10720 seq_printf(sf, "%llu.%0*u\n", percent, UCLAMP_PERCENT_SHIFT, rem);
2480c093130f64 Patrick Bellasi 2019-08-22 10721 }
2480c093130f64 Patrick Bellasi 2019-08-22 10722
:::::: The code at line 10713 was first introduced by commit
:::::: 2480c093130f64ac3a410504fa8b3db1fc4b87ce sched/uclamp: Extend CPU's cgroup controller
:::::: TO: Patrick Bellasi <patrick.bellasi@arm.com>
:::::: CC: Ingo Molnar <mingo@kernel.org>
--
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:[~2023-11-29 12:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-29 12:01 [tip:locking/core 1/3] kernel/sched/core.c:10713 cpu_uclamp_print() error: uninitialized symbol 'util_clamp' 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.