Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca1d6c7d authored by Nicholas Krause's avatar Nicholas Krause Committed by Linus Torvalds
Browse files

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: default avatarNicholas Krause <xerofoify@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d9e7e37b
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -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