lkml.org 
[lkml]   [2022]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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
\
 
 \ /
  Last update: 2022-05-27 23:09    [W:0.039 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site