* kernel/sched/rt.c:9:18: warning: 'max_rt_runtime' defined but not used
@ 2022-05-27 17:48 kernel test robot
2022-05-27 21:07 ` Luis Chamberlain
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2022-05-27 17:48 UTC (permalink / raw)
To: Baisong Zhong; +Cc: kbuild-all, linux-kernel, Luis Chamberlain
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7e284070abe53d448517b80493863595af4ab5f0
commit: 28f152cd0926596e69d412467b11b6fe6fe4e864 sched/rt: fix build error when CONFIG_SYSCTL is disable
date: 7 weeks ago
config: i386-tinyconfig (https://download.01.org/0day-ci/archive/20220528/202205280150.1w6rdhr4-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=28f152cd0926596e69d412467b11b6fe6fe4e864
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 28f152cd0926596e69d412467b11b6fe6fe4e864
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash kernel/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from kernel/sched/build_policy.c:43:
kernel/sched/rt.c:309:6: warning: no previous prototype for 'unregister_rt_sched_group' [-Wmissing-prototypes]
309 | void unregister_rt_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/rt.c:311:6: warning: no previous prototype for 'free_rt_sched_group' [-Wmissing-prototypes]
311 | void free_rt_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~
kernel/sched/rt.c:313:5: warning: no previous prototype for 'alloc_rt_sched_group' [-Wmissing-prototypes]
313 | int alloc_rt_sched_group(struct task_group *tg, struct task_group *parent)
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/rt.c:716:6: warning: no previous prototype for 'sched_rt_bandwidth_account' [-Wmissing-prototypes]
716 | bool sched_rt_bandwidth_account(struct rt_rq *rt_rq)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/sched/rt.c:9:18: warning: 'max_rt_runtime' defined but not used [-Wunused-const-variable=]
9 | static const u64 max_rt_runtime = MAX_BW;
| ^~~~~~~~~~~~~~
vim +/max_rt_runtime +9 kernel/sched/rt.c
d505b8af58912a Huaixin Chang 2020-04-25 @9 static const u64 max_rt_runtime = MAX_BW;
ce0dbbbb30aee6 Clark Williams 2013-02-07 10
:::::: The code at line 9 was first introduced by commit
:::::: d505b8af58912ae1e1a211fabc9995b19bd40828 sched: Defend cfs and rt bandwidth quota against overflow
:::::: TO: Huaixin Chang <changhuaixin@linux.alibaba.com>
:::::: CC: Peter Zijlstra <peterz@infradead.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] sched/rt: fix compilation on i386 for umax_rt_runtime
2022-05-27 17:48 kernel/sched/rt.c:9:18: warning: 'max_rt_runtime' defined but not used kernel test robot
@ 2022-05-27 21:07 ` Luis Chamberlain
0 siblings, 0 replies; 3+ messages in thread
From: Luis Chamberlain @ 2022-05-27 21:07 UTC (permalink / raw)
To: mingo, peterz, juri.lelli
Cc: vincent.guittot, dietmar.eggemann, rostedt, Baisong Zhong,
kbuild-all, bsegall, mgorman, bristot, linux-kernel
On i386 you can end up with this compilation warning:
kernel/sched/rt.c:9:18: warning: 'max_rt_runtime' defined but not used [-Wunused-const-variable=]
This can happen when SYSCTL or RT_GROUP_SCHED is disabled.
Fix this.
Reported-by: kernel test robot <lkp@intel.com>
Cc: Baisong Zhong <zhongbaisong@huawei.com>
Signed-off-by: Luis Chamberlain <mcgrof@bgt140507bm04>
---
kernel/sched/rt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 8c9ed9664840..eb2a167be098 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -5,8 +5,10 @@
*/
int sched_rr_timeslice = RR_TIMESLICE;
+#if defined(CONFIG_SYSCTL) || defined(CONFIG_RT_GROUP_SCHED)
/* More than 4 hours if BW_SHIFT equals 20. */
static const u64 max_rt_runtime = MAX_BW;
+#endif
static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun);
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] sched/rt: fix compilation on i386 for umax_rt_runtime
@ 2022-05-27 21:07 ` Luis Chamberlain
0 siblings, 0 replies; 3+ messages in thread
From: Luis Chamberlain @ 2022-05-27 21:07 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 922 bytes --]
On i386 you can end up with this compilation warning:
kernel/sched/rt.c:9:18: warning: 'max_rt_runtime' defined but not used [-Wunused-const-variable=]
This can happen when SYSCTL or RT_GROUP_SCHED is disabled.
Fix this.
Reported-by: kernel test robot <lkp@intel.com>
Cc: Baisong Zhong <zhongbaisong@huawei.com>
Signed-off-by: Luis Chamberlain <mcgrof@bgt140507bm04>
---
kernel/sched/rt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 8c9ed9664840..eb2a167be098 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -5,8 +5,10 @@
*/
int sched_rr_timeslice = RR_TIMESLICE;
+#if defined(CONFIG_SYSCTL) || defined(CONFIG_RT_GROUP_SCHED)
/* More than 4 hours if BW_SHIFT equals 20. */
static const u64 max_rt_runtime = MAX_BW;
+#endif
static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun);
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-27 21:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-27 17:48 kernel/sched/rt.c:9:18: warning: 'max_rt_runtime' defined but not used kernel test robot
2022-05-27 21:07 ` [PATCH] sched/rt: fix compilation on i386 for umax_rt_runtime Luis Chamberlain
2022-05-27 21:07 ` Luis Chamberlain
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.