From a64ec0aefc7e05c3ca899ed8c2835142d3c2b8ff Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Thu, 3 Sep 2026 11:07:58 +0200 Subject: [PATCH] of: property: Drop superfluous !! 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 Link: https://patch.msgid.link/d32521ecddc0df9de1c5f21edb7935f7f543590f.1788426412.git.geert+renesas@glider.be Signed-off-by: Rob Herring (Arm) --- 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 72cf12907de0..abd0b2320779 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); @@ -1659,12 +1659,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)