From ba48d83bec18e9f2caf61979aadf9f8537086cee Mon Sep 17 00:00:00 2001 From: TOKITA Hiroshi Date: Sun, 8 Jun 2025 08:11:20 +0900 Subject: [PATCH] devicetree: Use `IS_EQ()` for `DT_SAME_NODE()` `DT_SAME_NODE()` is judged by `==` and cannot be used as a condition for `COND_CODE_1()`. Using `IS_EQ()` to make it possible for compile-time calculation. Signed-off-by: TOKITA Hiroshi --- include/zephyr/devicetree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/zephyr/devicetree.h b/include/zephyr/devicetree.h index 2a9a6a44f2c..0860ae6b19b 100644 --- a/include/zephyr/devicetree.h +++ b/include/zephyr/devicetree.h @@ -690,7 +690,7 @@ * refer to the same node, and evaluates to 0 otherwise */ #define DT_SAME_NODE(node_id1, node_id2) \ - (DT_DEP_ORD(node_id1) == (DT_DEP_ORD(node_id2))) + IS_EQ(DT_DEP_ORD(node_id1), DT_DEP_ORD(node_id2)) /** * @brief Get a devicetree node's node labels as an array of strings