From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751901AbbFZESh (ORCPT ); Fri, 26 Jun 2015 00:18:37 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:43142 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751575AbbFZESc (ORCPT ); Fri, 26 Jun 2015 00:18:32 -0400 Message-ID: <558CD28C.5090201@oracle.com> Date: Thu, 25 Jun 2015 21:18:20 -0700 From: Mike Kravetz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Nicholas Krause , akpm@linux-foundation.org CC: n-horiguchi@ah.jp.nec.com, rientjes@google.com, dave@stgolabs.net, lcapitulino@redhat.com, linux-mm@kvack.or, linux-kernel@vger.kernel.org Subject: Re: [PATCH] hugetlb:Make the function vma_shareable bool References: <1435281568-22312-1-git-send-email-xerofoify@gmail.com> In-Reply-To: <1435281568-22312-1-git-send-email-xerofoify@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/25/2015 06:19 PM, Nicholas Krause wrote: > This makes the function vma_shareable bool now due to this > particular function only ever returning either one or zero > as its return value. > > Signed-off-by: Nicholas Krause > --- > mm/hugetlb.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index 75c0eef..c1be0d1 100644 > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -3789,7 +3789,7 @@ static unsigned long page_table_shareable(struct vm_area_struct *svma, > return saddr; > } > > -static int vma_shareable(struct vm_area_struct *vma, unsigned long addr) > +static bool vma_shareable(struct vm_area_struct *vma, unsigned long addr) > { > unsigned long base = addr & PUD_MASK; > unsigned long end = base + PUD_SIZE; > @@ -3799,8 +3799,8 @@ static int vma_shareable(struct vm_area_struct *vma, unsigned long addr) > */ > if (vma->vm_flags & VM_MAYSHARE && > vma->vm_start <= base && end <= vma->vm_end) > - return 1; > - return 0; > + return true; > + return false; > } > > /* > I was looking at the page table sharing code just last week. Acked-by: Mike Kravetz -- Mike Kravetz