Skip to content

Commit ba48d83

Browse files
soburikartben
authored andcommitted
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 <tokita.hiroshi@gmail.com>
1 parent bd0efcc commit ba48d83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/zephyr/devicetree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@
690690
* refer to the same node, and evaluates to 0 otherwise
691691
*/
692692
#define DT_SAME_NODE(node_id1, node_id2) \
693-
(DT_DEP_ORD(node_id1) == (DT_DEP_ORD(node_id2)))
693+
IS_EQ(DT_DEP_ORD(node_id1), DT_DEP_ORD(node_id2))
694694

695695
/**
696696
* @brief Get a devicetree node's node labels as an array of strings

0 commit comments

Comments
 (0)