Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1009908ybh; Wed, 22 Jul 2020 20:23:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdw26+4jZzZ9Ifc3McVTakmmzARQZeTT0XctpzRGTldQdJxyzIP36Ls5/1TEDp+TbuekYh X-Received: by 2002:a17:906:abc9:: with SMTP id kq9mr2436482ejb.493.1595474612513; Wed, 22 Jul 2020 20:23:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595474612; cv=none; d=google.com; s=arc-20160816; b=OEsRHWoS56M8YdeVaUoqxHa/RaSvEMv5eHO3qb93PU8eVTEXBJuKn8JO3PQvt6Ybwf ROrRT40u/iP1d0VtncTwGcn9rDE0h2+WZhNOnYlf7v8YkdsJpqRCi+ubugzuyD+kvbQh rg591UIn1A9BAswgcjQiDPCDAPwGAjoFASq3StA0GNIuifKRWNvJUlSVx1O30fhSM2Lh DolTMQSJSm+DlNjzm22cl/818mJeYUEPo5NLdkX059NhGX8P8Eby/E/B43NBuMcuunk8 BImkJwR8vOFHj0nTRI6vP7wBJ6mzwdUhVhwyoT+ngC2sttXXTJhYsOiKeZBL4zWqgawG LcXA== 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=BTooNJ31kedJqWj3+6eiTB1g4irFJns6s4pfKDa5+oE=; b=y4chFgm1RNsF+oxXWShmUqAM9I5Sj9lEYD3kKqCkKdfK3x33+GQuvFVKKrQ83RKnbc fkB0WgwrzfgXuGhODXwEWMCinMFZ9AuhImP7n/1/kITjR2xJ5XIoRR4VYYC5BwXF7002 PbTe8O7+8cc9861vswvH07djplMrHjQIqVTcqnx4prAhjNXLQYYTibf/Y3N3UmoS5hNI D4weezingqtL9YL6mhhbvdFCovYY/i6QQDn4E/ag2DT8grJxWwfLZ+B6KkG2DVBj0Lt9 9jjpWtzR54RUFCIB0vArjDCjT0xrmtnOrlGa29nhFq9oxUQe8wC9mNLDtQqsYsmN544i RMVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=U7pm2mTO; 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 r22si1118825edq.411.2020.07.22.20.23.08; Wed, 22 Jul 2020 20:23:32 -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=U7pm2mTO; 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 S2387606AbgGWDXE (ORCPT + 99 others); Wed, 22 Jul 2020 23:23:04 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:52809 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728902AbgGWDXD (ORCPT ); Wed, 22 Jul 2020 23:23:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595474582; 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=BTooNJ31kedJqWj3+6eiTB1g4irFJns6s4pfKDa5+oE=; b=U7pm2mTO23T6HlRyluaaV7O+42ChAvsq3vLt8EaDu8kROiEi/HJYLJUmZC0BQ3NMTwJw8z yDcRGdXkilaXUoqdkKX0utUUKxrf03lyI9DSgs9svbW4JTBg2sXHG+i16drb2Z4Wki8Gby 5mx1D6oJ8PgdGROI+SaTm5Zaiwux3/o= 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-291-73hxUGVFM926SAg8fmk1KQ-1; Wed, 22 Jul 2020 23:22:59 -0400 X-MC-Unique: 73hxUGVFM926SAg8fmk1KQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D3E578017FB; Thu, 23 Jul 2020 03:22:58 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-13-53.pek2.redhat.com [10.72.13.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8087E69316; Thu, 23 Jul 2020 03:22:56 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, mike.kravetz@oracle.com, david@redhat.com, akpm@linux-foundation.org, bhe@redhat.com Subject: [PATCH v2 1/4] mm/hugetlb.c: make is_hugetlb_entry_hwpoisoned return bool Date: Thu, 23 Jul 2020 11:22:45 +0800 Message-Id: <20200723032248.24772-2-bhe@redhat.com> In-Reply-To: <20200723032248.24772-1-bhe@redhat.com> References: <20200723032248.24772-1-bhe@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, -- 2.17.2