* [PATCH] coresight: Use of_node_name_eq for node name comparisons
@ 2018-12-05 19:50 Rob Herring
2018-12-07 17:36 ` Mathieu Poirier
0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2018-12-05 19:50 UTC (permalink / raw)
To: devicetree, linux-kernel
Cc: Mathieu Poirier, Alexander Shishkin, linux-arm-kernel
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 <mathieu.poirier@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
drivers/hwtracing/coresight/of_coresight.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hwtracing/coresight/of_coresight.c b/drivers/hwtracing/coresight/of_coresight.c
index 89092f83567e..7045930fc958 100644
--- a/drivers/hwtracing/coresight/of_coresight.c
+++ b/drivers/hwtracing/coresight/of_coresight.c
@@ -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;
--
2.19.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] coresight: Use of_node_name_eq for node name comparisons
2018-12-05 19:50 [PATCH] coresight: Use of_node_name_eq for node name comparisons Rob Herring
@ 2018-12-07 17:36 ` Mathieu Poirier
0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Poirier @ 2018-12-07 17:36 UTC (permalink / raw)
To: Rob Herring
Cc: devicetree, linux-kernel, Alexander Shishkin, linux-arm-kernel
On Wed, Dec 05, 2018 at 01:50:50PM -0600, Rob Herring wrote:
> 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 <mathieu.poirier@linaro.org>
> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> drivers/hwtracing/coresight/of_coresight.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/of_coresight.c b/drivers/hwtracing/coresight/of_coresight.c
> index 89092f83567e..7045930fc958 100644
> --- a/drivers/hwtracing/coresight/of_coresight.c
> +++ b/drivers/hwtracing/coresight/of_coresight.c
> @@ -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.
>
> return parent;
> --
> 2.19.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-07 17:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-05 19:50 [PATCH] coresight: Use of_node_name_eq for node name comparisons Rob Herring
2018-12-07 17:36 ` Mathieu Poirier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).