All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm:Make the function vma_has_reserves bool
@ 2015-06-26 16:15 Nicholas Krause
  2015-06-26 17:28   ` Davidlohr Bueso
  0 siblings, 1 reply; 4+ messages in thread
From: Nicholas Krause @ 2015-06-26 16:15 UTC (permalink / raw)
  To: akpm
  Cc: n-horiguchi, rientjes, dave, mike.kravetz, lcapitulino, linux-mm,
	linux-kernel

This makes the function vma_has_reserves bool now due to this
particular function only returning either one or zero as its
return value.

Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
---
 mm/hugetlb.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 75c0eef..0c34b40 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -616,7 +616,7 @@ void reset_vma_resv_huge_pages(struct vm_area_struct *vma)
 }
 
 /* Returns true if the VMA has associated reserve pages */
-static int vma_has_reserves(struct vm_area_struct *vma, long chg)
+static bool vma_has_reserves(struct vm_area_struct *vma, long chg)
 {
 	if (vma->vm_flags & VM_NORESERVE) {
 		/*
@@ -629,23 +629,23 @@ static int vma_has_reserves(struct vm_area_struct *vma, long chg)
 		 * properly, so add work-around here.
 		 */
 		if (vma->vm_flags & VM_MAYSHARE && chg == 0)
-			return 1;
+			return true;
 		else
-			return 0;
+			return false;
 	}
 
 	/* Shared mappings always use reserves */
 	if (vma->vm_flags & VM_MAYSHARE)
-		return 1;
+		return true;
 
 	/*
 	 * Only the process that called mmap() has reserves for
 	 * private mappings.
 	 */
 	if (is_vma_resv_set(vma, HPAGE_RESV_OWNER))
-		return 1;
+		return true;
 
-	return 0;
+	return false;
 }
 
 static void enqueue_huge_page(struct hstate *h, struct page *page)
-- 
2.1.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm:Make the function vma_has_reserves bool
  2015-06-26 16:15 [PATCH] mm:Make the function vma_has_reserves bool Nicholas Krause
@ 2015-06-26 17:28   ` Davidlohr Bueso
  0 siblings, 0 replies; 4+ messages in thread
From: Davidlohr Bueso @ 2015-06-26 17:28 UTC (permalink / raw)
  To: Nicholas Krause
  Cc: akpm, n-horiguchi, rientjes, mike.kravetz, lcapitulino, linux-mm,
	linux-kernel

On Fri, 2015-06-26 at 12:15 -0400, Nicholas Krause wrote:
> This makes the function vma_has_reserves bool now due to this
> particular function only returning either one or zero as its
> return value.
> 
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> ---
>  mm/hugetlb.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c

Yeah, don't be sending one patch per function change for this kind of
crap.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm:Make the function vma_has_reserves bool
@ 2015-06-26 17:28   ` Davidlohr Bueso
  0 siblings, 0 replies; 4+ messages in thread
From: Davidlohr Bueso @ 2015-06-26 17:28 UTC (permalink / raw)
  To: Nicholas Krause
  Cc: akpm, n-horiguchi, rientjes, mike.kravetz, lcapitulino, linux-mm,
	linux-kernel

On Fri, 2015-06-26 at 12:15 -0400, Nicholas Krause wrote:
> This makes the function vma_has_reserves bool now due to this
> particular function only returning either one or zero as its
> return value.
> 
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> ---
>  mm/hugetlb.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c

Yeah, don't be sending one patch per function change for this kind of
crap.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm:Make the function vma_has_reserves bool
  2015-06-26 17:28   ` Davidlohr Bueso
  (?)
@ 2015-06-26 17:34   ` Nicholas Krause
  -1 siblings, 0 replies; 4+ messages in thread
From: Nicholas Krause @ 2015-06-26 17:34 UTC (permalink / raw)
  To: Davidlohr Bueso
  Cc: akpm, n-horiguchi, rientjes, mike.kravetz, lcapitulino, linux-mm,
	linux-kernel



On June 26, 2015 1:28:06 PM EDT, Davidlohr Bueso <dave@stgolabs.net> wrote:
>On Fri, 2015-06-26 at 12:15 -0400, Nicholas Krause wrote:
>> This makes the function vma_has_reserves bool now due to this
>> particular function only returning either one or zero as its
>> return value.
>> 
>> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
>> ---
>>  mm/hugetlb.c | 12 ++++++------
>>  1 file changed, 6 insertions(+), 6 deletions(-)
>> 
>> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
>
>Yeah, don't be sending one patch per function change for this kind of
>crap.
Sure no problem.  Is this applied however. 
Nick
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-26 17:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-26 16:15 [PATCH] mm:Make the function vma_has_reserves bool Nicholas Krause
2015-06-26 17:28 ` Davidlohr Bueso
2015-06-26 17:28   ` Davidlohr Bueso
2015-06-26 17:34   ` Nicholas Krause

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.