* [PATCH] of: property: Drop superfluous !!
@ 2026-09-03 9:07 Geert Uytterhoeven
2026-09-04 23:29 ` Rob Herring
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2026-09-03 9:07 UTC (permalink / raw)
To: Rob Herring, Saravana Kannan; +Cc: devicetree, linux-kernel, Geert Uytterhoeven
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@glider.be>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] of: property: Drop superfluous !!
2026-09-03 9:07 [PATCH] of: property: Drop superfluous !! Geert Uytterhoeven
@ 2026-09-04 23:29 ` Rob Herring
0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2026-09-04 23:29 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Saravana Kannan, devicetree, linux-kernel
On Thu, Sep 03, 2026 at 11:07:58AM +0200, Geert Uytterhoeven wrote:
> 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@glider.be>
> ---
> No change in generated code.
>
> drivers/of/property.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-04 23:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03 9:07 [PATCH] of: property: Drop superfluous !! Geert Uytterhoeven
2026-09-04 23:29 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox