summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorChen Ridong <chenridong@huawei.com>2025-09-17 06:04:46 +0000
committerTejun Heo <tj@kernel.org>2025-09-17 08:37:30 -1000
commit6a59fc4a3a5b19ea375b54ea70d16713c45ea5a0 (patch)
tree9c65ef288a163d470afcc8f512824206d2bf06c0 /kernel
parentbba0ccf829b904e6d1f119d94f01d7209d34ba28 (diff)
cpuset: change return type of is_partition_[in]valid to bool
The functions is_partition_valid() and is_partition_invalid() logically return boolean values, but were previously declared with return type 'int'. This patch changes their return type to 'bool' to better reflect their semantic meaning and improve type safety. Signed-off-by: Chen Ridong <chenridong@huawei.com> Reviewed-by: Waiman Long <longman@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cgroup/cpuset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index bea7e6ef5d5d..1eb76a78b190 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -160,12 +160,12 @@ void dec_dl_tasks_cs(struct task_struct *p)
cs->nr_deadline_tasks--;
}
-static inline int is_partition_valid(const struct cpuset *cs)
+static inline bool is_partition_valid(const struct cpuset *cs)
{
return cs->partition_root_state > 0;
}
-static inline int is_partition_invalid(const struct cpuset *cs)
+static inline bool is_partition_invalid(const struct cpuset *cs)
{
return cs->partition_root_state < 0;
}