From patchwork Wed Sep 18 19:59:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 174008 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp103696ill; Wed, 18 Sep 2019 13:00:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqz15xpBVKqmy0JUL7gmXZODkzPvUGOJf8W2E/sMNoB5sYlHT+oyqEkiv/1BOQiYipZkOFmg X-Received: by 2002:a05:6402:346:: with SMTP id r6mr12111853edw.124.1568836854933; Wed, 18 Sep 2019 13:00:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568836854; cv=none; d=google.com; s=arc-20160816; b=yoOlXkzMZ81W7NpaindUKnP85M69E5ECk1AvCS/A/Esey08jklkqmpLyRqfF4gwKHq 509wSZN8Xm4OP698oLAkZOIAqbeftL5A/SCXa5HezuPsWFwCjPQvcFXfJBptUJogdFoI /FKrEqhM1jp+95OXfh6eOgkqpf4xl6weqt/YEAf+x1Xee1kB1ssTxfE35o0XFn6pVzET lBANJqnexG49vuZtkOmJaK3jG6qolbgcdIitsbWQCHPWZUM1CWMr+snENAxIR53JPqWx MZxBRFamvJv9FgNe9I7KqShAW2QPgVrtQLtKOUsNNQb7NfusQ/EIqKiqm8DWWyK51GSJ sK6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=OC7ub6p+alXi6ZfbSeRJnoTbGWyTGSktKmpRghF1q1c=; b=wjYuGSpV6sFTsMBhQkt1gaWBNPgCFZXHTlfshq/xd/XLO9NUdJYxm3Y7uD4nivUyLw RB1EWm3TMAEMgDD4q765Yq3Ej6g2XCtjyyXSAt3cDK1tMkQ6Kq3zJwUJwufW4JxLU3by nIP4lX08ZOntcYPB52iToZu1/DVVD1TW4xSY8xBmbjhA3KOhXdJWgk8ZRjXZK4yY4dnl ThFpo/B4YPz3xan50Kd+IjLNT4eLZmi+1GjB2cvbPU9Mgas3jr6TgQMmJAMHkGVOAIzB tWIGs05kNPsfgtk5K1wAyGHabCYQIt4s1Gh36VI86fmIPz0SyXDAbIR/Ey4n6jZhvu7u vo1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1si293659ejt.354.2019.09.18.13.00.54; Wed, 18 Sep 2019 13:00:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389406AbfIRUAy (ORCPT + 26 others); Wed, 18 Sep 2019 16:00:54 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:40441 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389392AbfIRUAx (ORCPT ); Wed, 18 Sep 2019 16:00:53 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1MuluN-1hsjpK0RUJ-00rtNj; Wed, 18 Sep 2019 22:00:01 +0200 From: Arnd Bergmann 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@vger.kernel.org Subject: [PATCH] sched/uclamp: fix building without cgroup Date: Wed, 18 Sep 2019 21:59:43 +0200 Message-Id: <20190918195957.2220297-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:W6UnziFG3kMCKWVGK+UTFHQlxIRQdKUTIDJ084gJZNTBsNtL7DS dIuyXGOXC7wMu+LXWQVKCmOS7f1ED5X/+W23rhvFmZ93oFgE6dfpAMXgOvH0XsmyNoLI3HH 9EnW60Z64dOFjUQLl3GMhcwW0ZEpXdMLhyawy9laQr3otaNuyucqgiaS9ZYKYwm+7BwmvNo lml5Whhi/b4JIrqCPw5YQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:22tuQPy5xkA=:KvoQAZKEoK6LxT2oHtVPVc ArlCWm49saLo3vvbFy7b0J/kg085fN00/Q5QUfI4TbRZLDl9lqlbLkNpzC3LCb4XYlJkztfp3 305Us38WHV3xkRh+yGqfA7e8TVT8ScVOJzcREwt6w9u6yeaVnFm4mDK4FPjfyGRnsXU/BJ243 gmIVYQz58PEGIvC9bQSRXsfCtvywqV4A4CwKT4QvaVXNUYlhDNEGDF23Kx55LgmDBT216Bfq1 1F3CRAvCyjJZZIt4UoiqnFZNneg9ggAxzDWKK6113tdZ3S7DgTXyC5n5Yi8XNFg/T0uWyFbOF F7LWk14nNQQui/iCHz+GCJVb5cZjWh1ij4q0YRRu3m9rYZn64rVBRPMc36xOdQ5gT2hfghBJu IYxghUa6ZygtVyiX0nY+sNaFzLZgVJDBMzbQLFUZxskz+RTkAte2lrO473Hq1yEH6llyQ6W8y j3E6bhndiCjh0+n8RmJZNmUwrUZeZrSBJ9I8DE0MPFgeTYt9qrygw5IrwGBTSf/tEzPRyJ60L 2czBoeaycs2DRHw1QxCCfzXrcebpF800dASrtfU26Z+ZPxGjZ6b5wmoA93s9MxJBTjMMzee1n thAkmXgZ9MU8BFV+AOD2x5mmrIa/XGBnwQjGjFHabl5ZvZCxS24qvEfVPdQo6XU4y8ZNRwTQ3 d7Vy2j1mW58k7kc16CGtjPEnPhaz5ot1w5g/uQ5o+JN0ha8YlquTQRDVMMWPyLMeeXyafCMJN DQUYlSZQrcg17vzB4iRCZvJbc5qfZhGOBNGZi7I34TabvtMXZYp3gdVRaEERdDEEELsvQCZ0J 8cX1th/rNi+sy1R9n0wHu9GRRmND6m5FOYLy0pZCOoip57cwiXS6aLgPUNYdZbWDXXQFuBt+9 OsArzbrOdKCUMDbdYOLw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.0 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) {