mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched/uclamp: fix building without cgroup
@ 2019-09-18 19:59 Arnd Bergmann
  2019-09-18 20:38 ` Valentin Schneider
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2019-09-18 19:59 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot
  Cc: Arnd Bergmann, Patrick Bellasi, Michal Koutny, Tejun Heo,
	Alessio Balsini, Dietmar Eggemann, Joel Fernandes,
	Morten Rasmussen, Paul Turner, Quentin Perret,
	Rafael J . Wysocki, Steve Muckle, Suren Baghdasaryan,
	Thomas Gleixner, Todd Kjos, Viresh Kumar, Ingo Molnar,
	linux-kernel

The css_task_iter interfaces are defined conditionally and
cause build failures when used in other configurations:

kernel/sched/core.c:1081:23: error: variable has incomplete type 'struct css_task_iter'
kernel/sched/core.c:1084:2: error: implicit declaration of function 'css_task_iter_start' [-Werror,-Wimplicit-function-declaration]
kernel/sched/core.c:1085:14: error: implicit declaration of function 'css_task_iter_next' [-Werror,-Wimplicit-function-declaration]
kernel/sched/core.c:1091:2: error: implicit declaration of function 'css_task_iter_end' [-Werror,-Wimplicit-function-declaration]

As this code is unused anyway in that configuration, just put
it into the same #ifdef. This also avoids possible warnings
about unused inline functions.

Fixes: babbe170e053 ("sched/uclamp: Update CPU's refcount on TG's clamp changes")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index f9a1346a5fa9..f25e3949a5ba 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1043,6 +1043,7 @@ static inline void uclamp_rq_dec(struct rq *rq, struct task_struct *p)
 		uclamp_rq_dec_id(rq, p, clamp_id);
 }
 
+#ifdef CONFIG_UCLAMP_TASK_GROUP
 static inline void
 uclamp_update_active(struct task_struct *p, enum uclamp_id clamp_id)
 {
@@ -1091,7 +1092,6 @@ uclamp_update_active_tasks(struct cgroup_subsys_state *css,
 	css_task_iter_end(&it);
 }
 
-#ifdef CONFIG_UCLAMP_TASK_GROUP
 static void cpu_util_update_eff(struct cgroup_subsys_state *css);
 static void uclamp_update_root_tg(void)
 {
-- 
2.20.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-18 20:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-18 19:59 [PATCH] sched/uclamp: fix building without cgroup Arnd Bergmann
2019-09-18 20:38 ` Valentin Schneider

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®