[PATCH] mm: fix boolreturn.cocci warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: kbuild test robot <lkp@xxxxxxxxx>

arch/x86/mm/ioremap.c:465:8-9: WARNING: return of 0/1 in function 'arch_vmap_p4d_supported' with return type bool
arch/x86/mm/ioremap.c:473:8-9: WARNING: return of 0/1 in function 'arch_vmap_pud_supported' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

CC: Nicholas Piggin <npiggin@xxxxxxxxx>
Signed-off-by: kbuild test robot <lkp@xxxxxxxxx>
---

url:    https://github.com/0day-ci/linux/commits/Nicholas-Piggin/huge-vmalloc-mappings/20200414-031028
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core

 ioremap.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -462,7 +462,7 @@ EXPORT_SYMBOL(iounmap);
 
 bool arch_vmap_p4d_supported(pgprot_t prot)
 {
-	return 0;
+	return false;
 }
 
 bool arch_vmap_pud_supported(pgprot_t prot)
@@ -470,7 +470,7 @@ bool arch_vmap_pud_supported(pgprot_t pr
 #ifdef CONFIG_X86_64
 	return boot_cpu_has(X86_FEATURE_GBPAGES);
 #else
-	return 0;
+	return false;
 #endif
 }
 




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux