kernel/cpuset: current_cpuset_is_being_rebound can be boolean
authorYaowei Bai <baiyaowei@cmss.chinamobile.com>
Tue, 6 Feb 2018 23:41:24 +0000 (15:41 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Feb 2018 02:32:47 +0000 (18:32 -0800)
Make 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.

Link: http://lkml.kernel.org/r/1513266622-15860-4-git-send-email-baiyaowei@cmss.chinamobile.com
Signed-off-by: Yaowei Bai <baiyaowei@cmss.chinamobile.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/cpuset.h
kernel/cgroup/cpuset.c

index 1b8e41597ef536724fed06fbbea74e9ac6a7c501..934633a05d209138a815af3e0d073ae7a5ec1954 100644 (file)
@@ -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)
index f7efa7b4d825a350ca980fe325fdf7ce2db0178f..b42037e6e81d3af0eb8a2d8c5cbdf4bbd56e5824 100644 (file)
@@ -1254,9 +1254,9 @@ done:
        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;