summaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
authorNicholas Krause <xerofoify@gmail.com>2015-09-05 00:48:22 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-05 01:54:41 +0200
commitca1d6c7d9d461effa2c4e8b9b227a14e9fdcf1cc (patch)
tree2d07417d60374e7512498a74f285c2cbf2bb15c4 /mm/memory.c
parentmm/dmapool.c: change is_page_busy() return from int to bool (diff)
downloadlinux-ca1d6c7d9d461effa2c4e8b9b227a14e9fdcf1cc.tar.xz
linux-ca1d6c7d9d461effa2c4e8b9b227a14e9fdcf1cc.zip
mm/memory.c: make tlb_next_batch() return bool
This makes the tlb_next_batch() bool due to this particular function only ever returning either one or zero as its return value. Signed-off-by: Nicholas Krause <xerofoify@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r--mm/memory.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 2961fb654369..bb04d8f2f86c 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -181,22 +181,22 @@ static void check_sync_rss_stat(struct task_struct *task)
#ifdef HAVE_GENERIC_MMU_GATHER
-static int tlb_next_batch(struct mmu_gather *tlb)
+static bool tlb_next_batch(struct mmu_gather *tlb)
{
struct mmu_gather_batch *batch;
batch = tlb->active;
if (batch->next) {
tlb->active = batch->next;
- return 1;
+ return true;
}
if (tlb->batch_count == MAX_GATHER_BATCH_COUNT)
- return 0;
+ return false;
batch = (void *)__get_free_pages(GFP_NOWAIT | __GFP_NOWARN, 0);
if (!batch)
- return 0;
+ return false;
tlb->batch_count++;
batch->next = NULL;
@@ -206,7 +206,7 @@ static int tlb_next_batch(struct mmu_gather *tlb)
tlb->active->next = batch;
tlb->active = batch;
- return 1;
+ return true;
}
/* tlb_gather_mmu