Skip to contentSkip to conversation

extcon: Convert to using %pOF instead of full_name

PATCH In review Rob Herring 2 participants 2 messages Jul 18, 2017 – Jul 19, 2017 External connector subsystem (extcon)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 extcon: 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 MyungJoo Ham <[email protected]>
Cc Chanwoo Choi <[email protected]>
---
 drivers/extcon/extcon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/extcon/extcon.c +2 -2
index 8eccf7b14937..229364a9d868 100644
@@ -1363,8 +1363,8 @@ struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index)
 
 	node = of_parse_phandle(dev->of_node, "extcon", index);
 	if (!node) {
-		dev_dbg(dev, "failed to get phandle in %s node\n",
-			dev->of_node->full_name);
+		dev_dbg(dev, "failed to get phandle in %pOF node\n",
+			dev->of_node);
 		return ERR_PTR(-ENODEV);
 	}
 

--
2.11.0

maintainer
#1 lore raw

Hi,

Quoted 16 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.

Cc MyungJoo Ham <[email protected]>
Cc Chanwoo Choi <[email protected]>
---
 drivers/extcon/extcon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/extcon/extcon.c +0 -0
index 8eccf7b14937..229364a9d868 100644

drivers/extcon/extcon.c struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index) · line 1369

Quoted 9 lines
drivers/extcon/extcon.c +2 -2
@@ -1363,8 +1363,8 @@ struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index)
 
 	node = of_parse_phandle(dev->of_node, "extcon", index);
 	if (!node) {
-		dev_dbg(dev, "failed to get phandle in %s node\n",
-			dev->of_node->full_name);
+		dev_dbg(dev, "failed to get phandle in %pOF node\n",
+			dev->of_node);
 		return ERR_PTR(-ENODEV);
 	}

Applied it.

Signature · 7 lines
Best Regards,
Chanwoo Choi
Samsung Electronics
--
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