Commit fa1f68cc authored by Zou Wei's avatar Zou Wei Committed by Linus Torvalds

mm: use false for bool variable

Fixes coccicheck warnings:

  mm/zbud.c:246:1-20: WARNING: Assignment of 0/1 to bool variable
  mm/mremap.c:777:2-8: WARNING: Assignment of 0/1 to bool variable
  mm/huge_memory.c:525:9-10: WARNING: return of 0/1 in function 'is_transparent_hugepage' with return type bool
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZou Wei <zou_wei@huawei.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/1586835930-47076-1-git-send-email-zou_wei@huawei.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 985ba004
...@@ -522,7 +522,7 @@ void prep_transhuge_page(struct page *page) ...@@ -522,7 +522,7 @@ void prep_transhuge_page(struct page *page)
bool is_transparent_hugepage(struct page *page) bool is_transparent_hugepage(struct page *page)
{ {
if (!PageCompound(page)) if (!PageCompound(page))
return 0; return false;
page = compound_head(page); page = compound_head(page);
return is_huge_zero_page(page) || return is_huge_zero_page(page) ||
......
...@@ -785,7 +785,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len, ...@@ -785,7 +785,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
out: out:
if (offset_in_page(ret)) { if (offset_in_page(ret)) {
vm_unacct_memory(charged); vm_unacct_memory(charged);
locked = 0; locked = false;
} }
if (downgraded) if (downgraded)
up_read(&current->mm->mmap_sem); up_read(&current->mm->mmap_sem);
......
...@@ -243,7 +243,7 @@ static struct zbud_header *init_zbud_page(struct page *page) ...@@ -243,7 +243,7 @@ static struct zbud_header *init_zbud_page(struct page *page)
zhdr->last_chunks = 0; zhdr->last_chunks = 0;
INIT_LIST_HEAD(&zhdr->buddy); INIT_LIST_HEAD(&zhdr->buddy);
INIT_LIST_HEAD(&zhdr->lru); INIT_LIST_HEAD(&zhdr->lru);
zhdr->under_reclaim = 0; zhdr->under_reclaim = false;
return zhdr; return zhdr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment