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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3378e469-be94-956a-a53c-4067e437e604@huawei.com>
Date:   Tue, 26 Jan 2021 14:53:18 +0800
From:   Miaohe Lin <linmiaohe@...wei.com>
To:     Jiapeng Zhong <abaci-bugfix@...ux.alibaba.com>
CC:     <akpm@...ux-foundation.org>, <linux-mm@...ck.org>,
        <linux-kernel@...r.kernel.org>,
        Mike Kravetz <mike.kravetz@...cle.com>
Subject: Re: [PATCH] mm/hugetlb: Simplify the calculation of variables

Hi:
On 2021/1/26 14:44, Jiapeng Zhong wrote:
> Fix the following coccicheck warnings:
> 
> ./mm/hugetlb.c:3372:20-22: WARNING !A || A && B is equivalent to
> !A || B.
> 
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: Jiapeng Zhong <abaci-bugfix@...ux.alibaba.com>
> ---
>  mm/hugetlb.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index cbf32d2..5e6a6e7 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -3367,8 +3367,7 @@ static unsigned int allowed_mems_nr(struct hstate *h)
>  	mpol_allowed = policy_nodemask_current(gfp_mask);
>  
>  	for_each_node_mask(node, cpuset_current_mems_allowed) {
> -		if (!mpol_allowed ||
> -		    (mpol_allowed && node_isset(node, *mpol_allowed)))
> +		if (!mpol_allowed || node_isset(node, *mpol_allowed))
>  			nr += array[node];
>  	}
>  
> 

I'm gonna do this too. :)

Reviewed-by: Miaohe Lin <linmiaohe@...wei.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ