Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1046126ybh; Wed, 22 Jul 2020 21:48:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQBjjAizsufTHoefBivPf1LOilgDsIykSx/tiTFfQtwLEBJxBcFYTk81+8gbZv6TVaOW6V X-Received: by 2002:a17:906:7d90:: with SMTP id v16mr2615932ejo.27.1595479725928; Wed, 22 Jul 2020 21:48:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595479725; cv=none; d=google.com; s=arc-20160816; b=g8itDtssWgKk2hc7+IMsSViIhVv7hss1Qz38EJHy63ZRnzM5C1mDTDvC62mXhTHvOO RAaNUaBm4F1PbHB3GUk/Zo5GWs1JyHlU4NDvk4UPgXMo8J+8q3JKSsTfdKlKsn/4mx0G QufDjhgAUfOARmxorIuCqSRwWs8cTsB30i+1rJm8nkQMbAC4r/iaYzBYTj3pto0WqnB0 lAUKfNEgKUQKL96Ek631CzgmI7pbbCaJ/U3VBLozAy+6XUBTRxnpGtgfWGfdyumXv5tU B87/8Yh5rNf2wpEsBzxsABWqLH5mqWiFFJ6kg/5mxUIj/7Dsc5iR4ATnQ7wWWfPs6Kt8 w7rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=bt8ewXoEKfDVOhcVcPuL1WBYze8VvYQDfe1JLobZz0k=; b=uv78vVtbvmOZDL0Z8f/VG1fYPP1NxZW1F+Ydw3FkKM9Ff8q92Zl5cZ+WjtLWQW6fpl Cm/JLiGWNv0oCwUQ6VNgoPgekv3efAPsVX0/N+5x80bkb5xopH6myiteTyA1VdSkx0bC r3DzOoawNj+51OzKkQIZkCfiNyzxffQvnL+hCxx2WsGe48k13bdwvEZ+rLp8xrOcqz3C yEJZsVzNXZlYZy1KZT94GLP1vTFYseiCsdZAjkWE6PyqMLBZMlsRJUjYpBKJl/ZeFUkp REBCVW8n304Vg/QO/rDdF3DY1lMfHjSF+rcE7sVFWY2mgRzZBmY4Exq/VKVBlboydQAa Lizg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 92si1338752edj.9.2020.07.22.21.48.23; Wed, 22 Jul 2020 21:48:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726317AbgGWEr0 (ORCPT + 99 others); Thu, 23 Jul 2020 00:47:26 -0400 Received: from foss.arm.com ([217.140.110.172]:38894 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725774AbgGWEr0 (ORCPT ); Thu, 23 Jul 2020 00:47:26 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2379D31B; Wed, 22 Jul 2020 21:47:26 -0700 (PDT) Received: from [10.163.85.73] (unknown [10.163.85.73]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D4D953F718; Wed, 22 Jul 2020 21:47:23 -0700 (PDT) Subject: Re: [PATCH v2 1/4] mm/hugetlb.c: make is_hugetlb_entry_hwpoisoned return bool To: Baoquan He , linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, mike.kravetz@oracle.com, david@redhat.com, akpm@linux-foundation.org References: <20200723032248.24772-1-bhe@redhat.com> <20200723032248.24772-2-bhe@redhat.com> From: Anshuman Khandual Message-ID: <49c832ba-7f44-4e8a-b94a-629b53499f11@arm.com> Date: Thu, 23 Jul 2020 10:16:54 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200723032248.24772-2-bhe@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/23/2020 08:52 AM, Baoquan He wrote: > Just like its neighbour is_hugetlb_entry_migration() has done. > > Signed-off-by: Baoquan He > Reviewed-by: Mike Kravetz > Reviewed-by: David Hildenbrand > --- > mm/hugetlb.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index f24acb3af741..3569e731e66b 100644 > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -3754,17 +3754,17 @@ bool is_hugetlb_entry_migration(pte_t pte) > return false; > } > > -static int is_hugetlb_entry_hwpoisoned(pte_t pte) > +static bool is_hugetlb_entry_hwpoisoned(pte_t pte) > { > swp_entry_t swp; > > if (huge_pte_none(pte) || pte_present(pte)) > - return 0; > + return false; > swp = pte_to_swp_entry(pte); > if (non_swap_entry(swp) && is_hwpoison_entry(swp)) > - return 1; > + return true; > else > - return 0; > + return false; > } > > int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src, > Reviewed-by: Anshuman Khandual