[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <351e1075-0074-005a-dd70-cebc78257639@oracle.com>
Date: Tue, 26 Jan 2021 18:09:44 -0800
From: Mike Kravetz <mike.kravetz@...cle.com>
To: Jiapeng Zhong <abaci-bugfix@...ux.alibaba.com>
Cc: akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/hugetlb: Simplify the calculation of variables
On 1/25/21 10:44 PM, 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(-)
Thanks,
Reviewed-by: Mike Kravetz <mike.kravetz@...cle.com>
--
Mike Kravetz
>
> 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];
> }
>
>
Powered by blists - more mailing lists