[PATCH] arm64: fix boolconv.cocci warnings
kernel test robot
lkp at intel.com
Fri Oct 29 08:33:52 PDT 2021
From: kernel test robot <lkp at intel.com>
arch/arm64/kernel/acpi.c:71:26-31: 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
CC: Rob Herring <robh at kernel.org>
Reported-by: kernel test robot <lkp at intel.com>
Signed-off-by: kernel test robot <lkp at intel.com>
---
url: https://github.com/0day-ci/linux/commits/Rob-Herring/arm64-Simplify-checking-for-populated-DT/20211029-023532
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
:::::: branch date: 21 hours ago
:::::: commit date: 21 hours ago
acpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/arm64/kernel/acpi.c
+++ b/arch/arm64/kernel/acpi.c
@@ -68,7 +68,7 @@ static bool __init dt_is_populated(void)
const void *fdt = initial_boot_params;
int node = fdt_node_offset_by_compatible(fdt, -1, "arm,armv8-timer");
- return node > 0 ? true : false;
+ return node > 0;
}
/*
More information about the linux-arm-kernel
mailing list