atm: Convert to using %pOFn instead of device_node.name

Message ID 20181116220540.17222-1-robh@kernel.org
State New
Headers show
Series
  • atm: Convert to using %pOFn instead of device_node.name
Related show

Commit Message

Rob Herring Nov. 16, 2018, 10:05 p.m.
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Chas Williams <3chas3@gmail.com>
Cc: linux-atm-general@lists.sourceforge.net
Cc: netdev@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>

---
 drivers/atm/fore200e.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.19.1

Comments

David Miller Nov. 18, 2018, 5:52 a.m. | #1
From: Rob Herring <robh@kernel.org>

Date: Fri, 16 Nov 2018 16:05:37 -0600

> In preparation to remove the node name pointer from struct device_node,

> convert printf users to use the %pOFn format specifier.

> 

> Cc: Chas Williams <3chas3@gmail.com>

> Cc: linux-atm-general@lists.sourceforge.net

> Cc: netdev@vger.kernel.org

> Signed-off-by: Rob Herring <robh@kernel.org>


Applied to net-next.
Guenter Roeck Nov. 18, 2018, 10:43 p.m. | #2
On Fri, Nov 16, 2018 at 04:05:38PM -0600, Rob Herring wrote:
> In preparation to remove the node name pointer from struct device_node,

> convert printf users to use the %pOFn format specifier.

> 

> Cc: Jean Delvare <jdelvare@suse.com>

> Cc: Guenter Roeck <linux@roeck-us.net>

> Cc: linux-hwmon@vger.kernel.org

> Signed-off-by: Rob Herring <robh@kernel.org>


Applied to hwmon-next.

Thanks,
Guenter

> ---

>  drivers/hwmon/ina3221.c | 8 ++++----

>  1 file changed, 4 insertions(+), 4 deletions(-)

> 

> diff --git a/drivers/hwmon/ina3221.c b/drivers/hwmon/ina3221.c

> index d61688f04594..27abbc5b9d46 100644

> --- a/drivers/hwmon/ina3221.c

> +++ b/drivers/hwmon/ina3221.c

> @@ -469,10 +469,10 @@ static int ina3221_probe_child_from_dt(struct device *dev,

>  

>  	ret = of_property_read_u32(child, "reg", &val);

>  	if (ret) {

> -		dev_err(dev, "missing reg property of %s\n", child->name);

> +		dev_err(dev, "missing reg property of %pOFn\n", child);

>  		return ret;

>  	} else if (val > INA3221_CHANNEL3) {

> -		dev_err(dev, "invalid reg %d of %s\n", val, child->name);

> +		dev_err(dev, "invalid reg %d of %pOFn\n", val, child);

>  		return ret;

>  	}

>  

> @@ -490,8 +490,8 @@ static int ina3221_probe_child_from_dt(struct device *dev,

>  	/* Overwrite default shunt resistor value optionally */

>  	if (!of_property_read_u32(child, "shunt-resistor-micro-ohms", &val)) {

>  		if (val < 1 || val > INT_MAX) {

> -			dev_err(dev, "invalid shunt resistor value %u of %s\n",

> -				val, child->name);

> +			dev_err(dev, "invalid shunt resistor value %u of %pOFn\n",

> +				val, child);

>  			return -EINVAL;

>  		}

>  		input->shunt_resistor = val;

Patch

diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index f55ffde877b5..14053e01a2cc 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -754,8 +754,8 @@  static int fore200e_sba_proc_read(struct fore200e *fore200e, char *page)
 
 	regs = of_get_property(op->dev.of_node, "reg", NULL);
 
-	return sprintf(page, "   SBUS slot/device:\t\t%d/'%s'\n",
-		       (regs ? regs->which_io : 0), op->dev.of_node->name);
+	return sprintf(page, "   SBUS slot/device:\t\t%d/'%pOFn'\n",
+		       (regs ? regs->which_io : 0), op->dev.of_node);
 }
 
 static const struct fore200e_bus fore200e_sbus_ops = {