Messages in this thread Patch in this message | | | Date | Fri, 27 May 2022 14:07:49 -0700 | From | Luis Chamberlain <> | Subject | [PATCH] sched/rt: fix compilation on i386 for umax_rt_runtime |
| |
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
| |