]> git.baikalelectronics.ru Git - kernel.git/commitdiff
riscv: fix boolconv.cocci warnings
authorkernel test robot <lkp@intel.com>
Wed, 19 Jan 2022 03:38:36 +0000 (11:38 +0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 20 Jan 2022 03:52:30 +0000 (19:52 -0800)
arch/riscv/mm/init.c:48:11-16: WARNING: conversion to bool not needed here

 Remove unneeded conversion to bool

Semantic patch information:
 Relational and logical operators evaluate to bool,
 explicit conversion is overly verbose and unneeded.

Generated by: scripts/coccinelle/misc/boolconv.cocci

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/mm/init.c

index 8def6f8db0b0b0e923f705dfe8f97308868d46da..cf4d018b7d668fc442aab4e08ad6f98d7aca972f 100644 (file)
@@ -44,8 +44,7 @@ u64 satp_mode = SATP_MODE_32;
 #endif
 EXPORT_SYMBOL(satp_mode);
 
-bool pgtable_l4_enabled = IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_XIP_KERNEL) ?
-                               true : false;
+bool pgtable_l4_enabled = IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_XIP_KERNEL);
 EXPORT_SYMBOL(pgtable_l4_enabled);
 
 phys_addr_t phys_ram_base __ro_after_init;