Skip to contentSkip to conversation

PM / Domains: Convert to using %pOF instead of full_name

PATCH In review Rob Herring 3 participants 3 messages Jul 18, 2017 – Jul 21, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PM / Domains: Convert to using %pOF instead of full_name

Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node.

Cc "Rafael J. Wysocki" <[email protected]>
Cc Kevin Hilman <[email protected]>
Cc Ulf Hansson <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Len Brown <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/base/power/domain.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/base/power/domain.c +7 -7
index 3b8210ebb50e..d0989f9b5e67 100644
@@ -1743,7 +1743,7 @@ static int genpd_add_provider(struct device_node *np, genpd_xlate_t xlate,
 	mutex_lock(&of_genpd_mutex);
 	list_add(&cp->link, &of_genpd_providers);
 	mutex_unlock(&of_genpd_mutex);
-	pr_debug("Added domain provider from %s\n", np->full_name);
+	pr_debug("Added domain provider from %pOF\n", np);
 
 	return 0;
 }
@@ -2149,16 +2149,16 @@ static int genpd_parse_state(struct genpd_power_state *genpd_state,
 	err = of_property_read_u32(state_node, "entry-latency-us",
 						&entry_latency);
 	if (err) {
-		pr_debug(" * %s missing entry-latency-us property\n",
-						state_node->full_name);
+		pr_debug(" * %pOF missing entry-latency-us property\n",
+						state_node);
 		return -EINVAL;
 	}
 
 	err = of_property_read_u32(state_node, "exit-latency-us",
 						&exit_latency);
 	if (err) {
-		pr_debug(" * %s missing exit-latency-us property\n",
-						state_node->full_name);
+		pr_debug(" * %pOF missing exit-latency-us property\n",
+						state_node);
 		return -EINVAL;
 	}
 
@@ -2212,8 +2212,8 @@ int of_genpd_parse_idle_states(struct device_node *dn,
 		ret = genpd_parse_state(&st[i++], np);
 		if (ret) {
 			pr_err
-			("Parsing idle state node %s failed with err %d\n",
-							np->full_name, ret);
+			("Parsing idle state node %pOF failed with err %d\n",
+							np, ret);
 			of_node_put(np);
 			kfree(st);
 			return ret;

--
2.11.0

Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Rob Herring

Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Acked-by on v1 1/1
#2 lore raw
In reply to Rob Herring
Quoted 4 lines · Rob Herring

Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node.

Quoted 8 lines
Cc "Rafael J. Wysocki" <[email protected]>
Cc Kevin Hilman <[email protected]>
Cc Ulf Hansson <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Len Brown <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>

Kind regards
Uffe

Quoted 52 lines
---
 drivers/base/power/domain.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/base/power/domain.c +7 -8
index 3b8210ebb50e..d0989f9b5e67 100644
@@ -1743,7 +1743,7 @@ static int genpd_add_provider(struct device_node *np, genpd_xlate_t xlate,
        mutex_lock(&of_genpd_mutex);
        list_add(&cp->link, &of_genpd_providers);
        mutex_unlock(&of_genpd_mutex);
-       pr_debug("Added domain provider from %s\n", np->full_name);
+       pr_debug("Added domain provider from %pOF\n", np);
 
        return 0;
 }
@@ -2149,16 +2149,16 @@ static int genpd_parse_state(struct genpd_power_state *genpd_state,
        err = of_property_read_u32(state_node, "entry-latency-us",
                                                &entry_latency);
        if (err) {
-               pr_debug(" * %s missing entry-latency-us property\n",
-                                               state_node->full_name);
+               pr_debug(" * %pOF missing entry-latency-us property\n",
+                                               state_node);
                return -EINVAL;
        }
 
        err = of_property_read_u32(state_node, "exit-latency-us",
                                                &exit_latency);
        if (err) {
-               pr_debug(" * %s missing exit-latency-us property\n",
-                                               state_node->full_name);
+               pr_debug(" * %pOF missing exit-latency-us property\n",
+                                               state_node);
                return -EINVAL;
        }
 
@@ -2212,8 +2212,8 @@ int of_genpd_parse_idle_states(struct device_node *dn,
                ret = genpd_parse_state(&st[i++], np);
                if (ret) {
                        pr_err
-                       ("Parsing idle state node %s failed with err %d\n",
-                                                       np->full_name, ret);
+                       ("Parsing idle state node %pOF failed with err %d\n",
+                                                       np, ret);
                        of_node_put(np);
                        kfree(st);
                        return ret;
--

2.11.0