Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1515815ybh; Sun, 19 Jul 2020 23:27:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyk0sy5PpUrAuutfsXqqbNSeM8y4h05Qvo99GXF9N/9SpondD3+SzMY7hmJQ52TzYLnY7Sh X-Received: by 2002:aa7:db4f:: with SMTP id n15mr19643916edt.193.1595226437227; Sun, 19 Jul 2020 23:27:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595226437; cv=none; d=google.com; s=arc-20160816; b=cMgE0P/mcpZDdWAnG6U/yOCGca6u9cPvUB0bX8f+UOia8zJCdUsx8Bl5WtNKoyHuEX tKRi2ehre5x20VM0aqnmiLn4e72MjbGI85ikV7z2G0LePaADLTD0bSRaE+J6wKPVu5NZ kcoFPzl28lsKXI4oVCHWtPmn1TyNmWP1HclSnGPhezyaUWCp14N7f8w+4Uxk2nARDhwG URP5RPsIhGNxN/1/bQhi4XIbXRvUxjG1V4vIl5ytBdCALclsUrJ3sHPLaxXlVVPFgsaN yX2n17nXXsGWqfhLxNR1TANSYX4da7JzHui7flt8+BzvyA7Us8jfWSaY9udEFVRCTH1B dUcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=HZVpm4zvUxz3yqhYdW0O0x6jO3M2RU27CaJXZlinWJc=; b=fF3jsdjMaWYVwnH/OfsLGGXmNcDBkZEIopHNHVcCPLjOgig8fYvoqFY0W3iLq6Y6Gs S7QnQmU46iNiXHBG40z3LXShh82kY7laJieqEy+RaIB5bOBOOv3/VafmSJFBJo68XJXF cY6mbQoBrAS8lDdOeS28gWtg8qv2ioj5AJmmTjwkFjLptdX7aZj2nDfpZ5UVVD58J1e8 hOcctMNMi7ThdNzNBnrxTxTK8xBZWKlDYIA0/44K60AilLWZNK+Rnt+9SzoZqUj3h9+S h7TskUEp1cJwVxs2GXRohfWCYeXKjhMMKyiXNs8GV1nnURF9E2ie/c2zymwkbNOh0Mth YsBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IiaS4jbX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mm15si9266277ejb.561.2020.07.19.23.26.55; Sun, 19 Jul 2020 23:27:17 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IiaS4jbX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727033AbgGTG0j (ORCPT + 99 others); Mon, 20 Jul 2020 02:26:39 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:54395 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726998AbgGTG0h (ORCPT ); Mon, 20 Jul 2020 02:26:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595226397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=HZVpm4zvUxz3yqhYdW0O0x6jO3M2RU27CaJXZlinWJc=; b=IiaS4jbXnw8BVLdmDjz+zLckI+B1we2J5bST7sWmv/Z/eqWMtHcqZEC4gWZEOsRtOAQBni P8okm72T7pYctBIczhY8yCUy49M1UBVGT/Ixc9ojXK/i0ZcaP3imy8fjaWcxrd2vumlycG PzBASeJyT2f3cSXaOoGEAkt9Fyn3+y4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-262-pmyWS8elN5qfgagnssZLaA-1; Mon, 20 Jul 2020 02:26:33 -0400 X-MC-Unique: pmyWS8elN5qfgagnssZLaA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0A7EE1080; Mon, 20 Jul 2020 06:26:32 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-12-150.pek2.redhat.com [10.72.12.150]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1D46678526; Mon, 20 Jul 2020 06:26:29 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, mike.kravetz@oracle.com, akpm@linux-foundation.org, bhe@redhat.com Subject: [PATCH 2/5] mm/hugetlb.c: make is_hugetlb_entry_hwpoisoned return bool Date: Mon, 20 Jul 2020 14:26:20 +0800 Message-Id: <20200720062623.13135-3-bhe@redhat.com> In-Reply-To: <20200720062623.13135-1-bhe@redhat.com> References: <20200720062623.13135-1-bhe@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Just like his neighbour is_hugetlb_entry_migration() has done. Signed-off-by: Baoquan He --- mm/hugetlb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 191a585bb315..a58f976a9dd9 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, -- 2.17.2