lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <94219ba5-d0f7-4c2c-8d82-daffb1d7d151@redhat.com>
Date: Mon, 15 Sep 2025 14:44:43 -0400
From: Waiman Long <llong@...hat.com>
To: Chen Ridong <chenridong@...weicloud.com>, tj@...nel.org,
 hannes@...xchg.org, mkoutny@...e.com
Cc: cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
 lujialin4@...wei.com, chenridong@...wei.com
Subject: Re: [PATCH -next RFC -v2 03/11] cpuset: change return type of
 is_partition_[in]valid to bool


On 9/8/25 11:32 PM, Chen Ridong wrote:
> From: Chen Ridong <chenridong@...wei.com>
>
> 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@...wei.com>
> ---
>   kernel/cgroup/cpuset.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
> index d21c448a35e1..a31b05f58e0e 100644
> --- a/kernel/cgroup/cpuset.c
> +++ b/kernel/cgroup/cpuset.c
> @@ -159,12 +159,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;
>   }
Reviewed-by: Waiman Long <longman@...hat.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ