Skip to contentSkip to conversation

regulator: Convert to using %pOF instead of full_name

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

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

PATCH 1/1 regulator: 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 Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Sangbeom Kim <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Bartlomiej Zolnierkiewicz <[email protected]>
Cc Philipp Zabel <[email protected]>
---
 drivers/regulator/core.c      | 4 ++--
 drivers/regulator/max1586.c   | 2 +-
 drivers/regulator/s5m8767.c   | 4 ++--
 drivers/reset/reset-socfpga.c | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)
drivers/regulator/core.c +2 -2
index e567fa54980b..d79ba9af9352 100644
@@ -204,8 +204,8 @@ static struct device_node *of_get_regulator(struct device *dev, const char *supp
 	regnode = of_parse_phandle(dev->of_node, prop_name, 0);
 
 	if (!regnode) {
-		dev_dbg(dev, "Looking up %s property in node %s failed\n",
-				prop_name, dev->of_node->full_name);
+		dev_dbg(dev, "Looking up %s property in node %pOF failed\n",
+				prop_name, dev->of_node);
 		return NULL;
 	}
 	return regnode;
drivers/regulator/max1586.c +1 -1
index 6779c2b53674..66bbaa999433 100644
@@ -169,7 +169,7 @@ static int of_get_max1586_platform_data(struct device *dev,
 
 	if (of_property_read_u32(np, "v3-gain",
 				 &pdata->v3_gain) < 0) {
-		dev_err(dev, "%s has no 'v3-gain' property\n", np->full_name);
+		dev_err(dev, "%pOF has no 'v3-gain' property\n", np);
 		return -EINVAL;
 	}
 
drivers/regulator/s5m8767.c +2 -2
index 383cd7533721..4836947e1521 100644
@@ -590,8 +590,8 @@ static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,
 		if (of_property_read_u32(reg_np, "op_mode",
 				&rmode->mode)) {
 			dev_warn(iodev->dev,
-				"no op_mode property property at %s\n",
-				reg_np->full_name);
+				"no op_mode property property at %pOF\n",
+				reg_np);
 
 			rmode->mode = S5M8767_OPMODE_NORMAL_MODE;
 		}
drivers/reset/reset-socfpga.c +2 -2
index 07224c019892..c60904ff40b8 100644
@@ -109,8 +109,8 @@ static int socfpga_reset_probe(struct platform_device *pdev)
 	 * Do not continue, when we encounter an old DT.
 	 */
 	if (!of_find_property(pdev->dev.of_node, "#reset-cells", NULL)) {
-		dev_err(&pdev->dev, "%s missing #reset-cells property\n",
-			pdev->dev.of_node->full_name);
+		dev_err(&pdev->dev, "%pOF missing #reset-cells property\n",
+			pdev->dev.of_node);
 		return -EINVAL;
 	}
 

--
2.11.0

maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 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 Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Sangbeom Kim <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Bartlomiej Zolnierkiewicz <[email protected]>
Cc Philipp Zabel <[email protected]>
Quoted 7 lines
---
 drivers/regulator/core.c      | 4 ++--
 drivers/regulator/max1586.c   | 2 +-
 drivers/regulator/s5m8767.c   | 4 ++--
 drivers/reset/reset-socfpga.c | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

Best regards,
Krzysztof

--
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

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Rob Herring
Quoted 11 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 Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Sangbeom Kim <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Bartlomiej Zolnierkiewicz <[email protected]>
Cc Philipp Zabel <[email protected]>

regards
Philipp

--
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