linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Patrick Bellasi <patrick.bellasi@arm.com>,
	Michal Koutny <mkoutny@suse.com>, Tejun Heo <tj@kernel.org>,
	Alessio Balsini <balsini@android.com>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Joel Fernandes <joelaf@google.com>,
	Morten Rasmussen <morten.rasmussen@arm.com>,
	Paul Turner <pjt@google.com>,
	Quentin Perret <quentin.perret@arm.com>,
	"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	Steve Muckle <smuckle@google.com>,
	Suren Baghdasaryan <surenb@google.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Todd Kjos <tkjos@google.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] sched/uclamp: fix building without cgroup
Date: Wed, 18 Sep 2019 21:59:43 +0200	[thread overview]
Message-ID: <20190918195957.2220297-1-arnd@arndb.de> (raw)

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


             reply	other threads:[~2019-09-18 20:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-18 19:59 Arnd Bergmann [this message]
2019-09-18 20:38 ` [PATCH] sched/uclamp: fix building without cgroup Valentin Schneider

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190918195957.2220297-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=balsini@android.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=joelaf@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mkoutny@suse.com \
    --cc=morten.rasmussen@arm.com \
    --cc=patrick.bellasi@arm.com \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=quentin.perret@arm.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=smuckle@google.com \
    --cc=surenb@google.com \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=tkjos@google.com \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).