Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755066AbdLODeQ (ORCPT ); Thu, 14 Dec 2017 22:34:16 -0500 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:58446 "EHLO cmccmta2.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754919AbdLODda (ORCPT ); Thu, 14 Dec 2017 22:33:30 -0500 X-RM-TRANSID: 2ee75a334288107-31d52 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee65a334282b14-d35ec From: Yaowei Bai To: akpm@linux-foundation.org, rdunlap@infradead.org, rientjes@google.com, joe@perches.com Cc: linux-kernel@vger.kernel.org, baiyaowei@cmss.chinamobile.com Subject: [PATCH 3/7] kernel/cpuset: current_cpuset_is_being_rebound can be boolean Date: Thu, 14 Dec 2017 22:33:15 -0500 Message-Id: <1513308799-19232-4-git-send-email-baiyaowei@cmss.chinamobile.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1513308799-19232-1-git-send-email-baiyaowei@cmss.chinamobile.com> References: <1513308799-19232-1-git-send-email-baiyaowei@cmss.chinamobile.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1506 Lines: 57 This patch makes current_cpuset_is_being_rebound return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai --- include/linux/cpuset.h | 6 +++--- kernel/cgroup/cpuset.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 1b8e415..934633a 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h @@ -112,7 +112,7 @@ static inline int cpuset_do_slab_mem_spread(void) return task_spread_slab(current); } -extern int current_cpuset_is_being_rebound(void); +extern bool current_cpuset_is_being_rebound(void); extern void rebuild_sched_domains(void); @@ -247,9 +247,9 @@ static inline int cpuset_do_slab_mem_spread(void) return 0; } -static inline int current_cpuset_is_being_rebound(void) +static inline bool current_cpuset_is_being_rebound(void) { - return 0; + return false; } static inline void rebuild_sched_domains(void) diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index f7efa7b..b42037e 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -1254,9 +1254,9 @@ static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs, return retval; } -int current_cpuset_is_being_rebound(void) +bool current_cpuset_is_being_rebound(void) { - int ret; + bool ret; rcu_read_lock(); ret = task_cs(current) == cpuset_being_rebound; -- 1.8.3.1