coresight: Use of_node_name_eq for node name comparisons
PATCH 1/1 coresight: Use of_node_name_eq for node name comparisons
Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer.
Cc Mathieu Poirier <[email protected]>
Cc Alexander Shishkin <[email protected]>
Signed-off-by Rob Herring <[email protected]>
--- drivers/hwtracing/coresight/of_coresight.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hwtracing/coresight/of_coresight.c +2 -2
@@ -80,8 +80,8 @@ static struct device_node *of_coresight_get_port_parent(struct device_node *ep)* Skip one-level up to the real device node, if we * are using the new bindings. */ -if (!of_node_cmp (parent->name,"in-ports" ) || - !of_node_cmp (parent->name,"out-ports" )) +if (of_node_name_eq (parent,"in-ports" ) || +of_node_name_eq (parent,"out-ports" )) parent =of_get_next_parent (parent);return parent;
Signature · 1 line
2.19.1
Quoted 16 lines · Rob Herring
Convert string compares of DT node names to use
of_node_name_eqhelper instead. This removes direct access to the node name pointer.Cc Mathieu Poirier <[email protected]>Cc Alexander Shishkin <[email protected]>Signed-off-by Rob Herring <[email protected]>--- drivers/hwtracing/coresight/of_coresight.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/hwtracing/coresight/of_coresight.c +0
-0
drivers/hwtracing/coresight/of_coresight.c static struct device_node *of_coresight_get_port_parent(struct device_node *ep) · line 85
Quoted 8 lines
drivers/hwtracing/coresight/of_coresight.c +2
-2@@ -80,8 +80,8 @@ static struct device_node *of_coresight_get_port_parent(struct device_node *ep)* Skip one-level up to the real device node, if we * are using the new bindings. */ -if (!of_node_cmp (parent->name,"in-ports" ) || - !of_node_cmp (parent->name,"out-ports" )) +if (of_node_name_eq (parent,"in-ports" ) || +of_node_name_eq (parent,"out-ports" )) parent =of_get_next_parent (parent);
Applied - thanks.
Quoted 5 lines
drivers/hwtracing/coresight/of_coresight.c +0
-0return parent;Signature · 1 line
2.19.1