Thread (5 messages) 5 messages, 3 authors, 2021-10-29
STALE1677d

[PATCH] arm64: fix boolconv.cocci warnings

From: kernel test robot <hidden>
Date: 2021-10-29 15:34:04
Also in: linux-arm-kernel, oe-kbuild-all

From: kernel test robot <redacted>

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@kernel.org>
Reported-by: kernel test robot <redacted>
Signed-off-by: kernel test robot <redacted>
---

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;
 }
 
 /*
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help