Skip to content

Commit

Permalink
riscv: fix boolconv.cocci warnings
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: kernel test robot <[email protected]>
Signed-off-by: Palmer Dabbelt <[email protected]>
  • Loading branch information
intel-lab-lkp authored and palmer-dabbelt committed Jan 20, 2022
1 parent 0c34e79 commit 20aa495
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/riscv/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 20aa495

Please sign in to comment.