[PATCH] of: property: Drop superfluous !!
From: Geert Uytterhoeven
Date: Thu Sep 03 2026 - 06:08:10 EST
When assigning a pointer or integral value to a boolean, there is no
need to insert a double logical inversion, as the assignment already
takes care of the conversion.
Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
---
No change in generated code.
drivers/of/property.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/of/property.c b/drivers/of/property.c
index 7568785391aadb1d..bc7cb4ee1627fb42 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -74,7 +74,7 @@ bool of_graph_is_present(const struct device_node *node)
struct device_node *port __free(device_node) = of_get_child_by_name(node, "port");
- return !!port;
+ return port;
}
EXPORT_SYMBOL(of_graph_is_present);
@@ -1679,12 +1679,12 @@ static bool of_is_fwnode_add_links_supported(void)
return true;
if (is_supported != -1)
- return !!is_supported;
+ return is_supported;
is_supported = !((match_property_by_path("/soc", "compatible", "intel,ce4100-cp") >= 0) ||
(match_property_by_path("/", "architecture", "OLPC") >= 0));
- return !!is_supported;
+ return is_supported;
}
static int of_fwnode_add_links(struct fwnode_handle *fwnode)
--
2.43.0