linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] atm: Convert to using %pOFn instead of device_node.name
@ 2018-11-16 22:05 Rob Herring
  2018-11-16 22:05 ` [PATCH] hwmon: ina3221: " Rob Herring
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Rob Herring @ 2018-11-16 22:05 UTC (permalink / raw)
  To: Chas Williams; +Cc: devicetree, linux-kernel, linux-atm-general, netdev

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

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 = {
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH] hwmon: ina3221: Convert to using %pOFn instead of device_node.name
  2018-11-16 22:05 [PATCH] atm: Convert to using %pOFn instead of device_node.name Rob Herring
@ 2018-11-16 22:05 ` Rob Herring
  2018-11-18 22:43   ` Guenter Roeck
  2018-11-16 22:05 ` [PATCH] macintosh: windfarm: Another convert " Rob Herring
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Rob Herring @ 2018-11-16 22:05 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: devicetree, linux-kernel, Jean Delvare, linux-hwmon

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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH] macintosh: windfarm: Another convert to using %pOFn instead of device_node.name
  2018-11-16 22:05 [PATCH] atm: Convert to using %pOFn instead of device_node.name Rob Herring
  2018-11-16 22:05 ` [PATCH] hwmon: ina3221: " Rob Herring
@ 2018-11-16 22:05 ` Rob Herring
  2018-12-07 13:07   ` Michael Ellerman
  2018-11-16 22:05 ` [PATCH] pinctrl: mediatek: Convert " Rob Herring
  2018-11-18  5:52 ` [PATCH] atm: " David Miller
  3 siblings, 1 reply; 11+ messages in thread
From: Rob Herring @ 2018-11-16 22:05 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: devicetree, linux-kernel, Benjamin Herrenschmidt, linuxppc-dev

In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Convert the open coded iterating thru child nodes to
for_each_child_of_node() while we're here.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/macintosh/windfarm_fcu_controls.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/macintosh/windfarm_fcu_controls.c b/drivers/macintosh/windfarm_fcu_controls.c
index fab7a21e9577..2b3ca628a650 100644
--- a/drivers/macintosh/windfarm_fcu_controls.c
+++ b/drivers/macintosh/windfarm_fcu_controls.c
@@ -425,18 +425,18 @@ static void wf_fcu_lookup_fans(struct wf_fcu_priv *pv)
 		{ "CPU B 2",		"cpu-fan-b-1",		},
 		{ "CPU B 3",		"cpu-fan-c-1",		},
 	};
-	struct device_node *np = NULL, *fcu = pv->i2c->dev.of_node;
+	struct device_node *np, *fcu = pv->i2c->dev.of_node;
 	int i;
 
 	DBG("Looking up FCU controls in device-tree...\n");
 
-	while ((np = of_get_next_child(fcu, np)) != NULL) {
+	for_each_child_of_node(fcu, np) {
 		int id, type = -1;
 		const char *loc;
 		const char *name;
 		const u32 *reg;
 
-		DBG(" control: %s, type: %s\n", np->name, np->type);
+		DBG(" control: %pOFn, type: %s\n", np, of_node_get_device_type(np));
 
 		/* Detect control type */
 		if (!strcmp(np->type, "fan-rpm-control") ||
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH] pinctrl: mediatek: Convert to using %pOFn instead of device_node.name
  2018-11-16 22:05 [PATCH] atm: Convert to using %pOFn instead of device_node.name Rob Herring
  2018-11-16 22:05 ` [PATCH] hwmon: ina3221: " Rob Herring
  2018-11-16 22:05 ` [PATCH] macintosh: windfarm: Another convert " Rob Herring
@ 2018-11-16 22:05 ` Rob Herring
  2018-11-16 23:46   ` Sean Wang
  2018-11-19 14:14   ` Linus Walleij
  2018-11-18  5:52 ` [PATCH] atm: " David Miller
  3 siblings, 2 replies; 11+ messages in thread
From: Rob Herring @ 2018-11-16 22:05 UTC (permalink / raw)
  To: Linus Walleij
  Cc: devicetree, linux-kernel, Sean Wang, Matthias Brugger,
	linux-mediatek, linux-gpio, linux-arm-kernel

In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Sean Wang <sean.wang@kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: linux-mediatek@lists.infradead.org
Cc: linux-gpio@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/pinctrl/mediatek/pinctrl-paris.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c
index d2179028f134..7ff5ffa88198 100644
--- a/drivers/pinctrl/mediatek/pinctrl-paris.c
+++ b/drivers/pinctrl/mediatek/pinctrl-paris.c
@@ -419,8 +419,8 @@ static int mtk_pctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev,
 
 	pins = of_find_property(node, "pinmux", NULL);
 	if (!pins) {
-		dev_err(hw->dev, "missing pins property in node %s .\n",
-			node->name);
+		dev_err(hw->dev, "missing pins property in node %pOFn .\n",
+			node);
 		return -EINVAL;
 	}
 
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] pinctrl: mediatek: Convert to using %pOFn instead of device_node.name
  2018-11-16 22:05 ` [PATCH] pinctrl: mediatek: Convert " Rob Herring
@ 2018-11-16 23:46   ` Sean Wang
  2018-11-19 19:07     ` Rob Herring
  2018-11-19 14:14   ` Linus Walleij
  1 sibling, 1 reply; 11+ messages in thread
From: Sean Wang @ 2018-11-16 23:46 UTC (permalink / raw)
  To: robh
  Cc: Linus Walleij, devicetree, linux-kernel, Matthias Brugger,
	linux-mediatek, linux-gpio, linux-arm-kernel

On Fri, Nov 16, 2018 at 2:06 PM Rob Herring <robh@kernel.org> wrote:
>
> In preparation to remove the node name pointer from struct device_node,
> convert printf users to use the %pOFn format specifier.
>
> Cc: Sean Wang <sean.wang@kernel.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-gpio@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Rob Herring <robh@kernel.org>

Acked-by: Sean Wang <sean.wang@kernel.org>

> ---
>  drivers/pinctrl/mediatek/pinctrl-paris.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c
> index d2179028f134..7ff5ffa88198 100644
> --- a/drivers/pinctrl/mediatek/pinctrl-paris.c
> +++ b/drivers/pinctrl/mediatek/pinctrl-paris.c
> @@ -419,8 +419,8 @@ static int mtk_pctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev,
>
>         pins = of_find_property(node, "pinmux", NULL);
>         if (!pins) {
> -               dev_err(hw->dev, "missing pins property in node %s .\n",
> -                       node->name);
> +               dev_err(hw->dev, "missing pins property in node %pOFn .\n",
> +                       node);
>                 return -EINVAL;
>         }
>
> --
> 2.19.1
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] atm: Convert to using %pOFn instead of device_node.name
  2018-11-16 22:05 [PATCH] atm: Convert to using %pOFn instead of device_node.name Rob Herring
                   ` (2 preceding siblings ...)
  2018-11-16 22:05 ` [PATCH] pinctrl: mediatek: Convert " Rob Herring
@ 2018-11-18  5:52 ` David Miller
  3 siblings, 0 replies; 11+ messages in thread
From: David Miller @ 2018-11-18  5:52 UTC (permalink / raw)
  To: robh; +Cc: 3chas3, devicetree, linux-kernel, linux-atm-general, netdev

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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] hwmon: ina3221: Convert to using %pOFn instead of device_node.name
  2018-11-16 22:05 ` [PATCH] hwmon: ina3221: " Rob Herring
@ 2018-11-18 22:43   ` Guenter Roeck
  0 siblings, 0 replies; 11+ messages in thread
From: Guenter Roeck @ 2018-11-18 22:43 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree, linux-kernel, Jean Delvare, linux-hwmon

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;

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] pinctrl: mediatek: Convert to using %pOFn instead of device_node.name
  2018-11-16 22:05 ` [PATCH] pinctrl: mediatek: Convert " Rob Herring
  2018-11-16 23:46   ` Sean Wang
@ 2018-11-19 14:14   ` Linus Walleij
  1 sibling, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2018-11-19 14:14 UTC (permalink / raw)
  To: Rob Herring
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, sean.wang, Matthias Brugger,
	moderated list:ARM/Mediatek SoC support,
	open list:GPIO SUBSYSTEM, Linux ARM

On Fri, Nov 16, 2018 at 11:06 PM Rob Herring <robh@kernel.org> wrote:

> In preparation to remove the node name pointer from struct device_node,
> convert printf users to use the %pOFn format specifier.
>
> Cc: Sean Wang <sean.wang@kernel.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-gpio@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Rob Herring <robh@kernel.org>

Patch applied with Sean's ACK.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] pinctrl: mediatek: Convert to using %pOFn instead of device_node.name
  2018-11-16 23:46   ` Sean Wang
@ 2018-11-19 19:07     ` Rob Herring
  2018-11-19 19:26       ` Sean Wang
  0 siblings, 1 reply; 11+ messages in thread
From: Rob Herring @ 2018-11-19 19:07 UTC (permalink / raw)
  To: Sean Wang
  Cc: Linus Walleij, devicetree, linux-kernel, Matthias Brugger,
	linux-mediatek, open list:GPIO SUBSYSTEM,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Fri, Nov 16, 2018 at 5:46 PM Sean Wang <sean.wang@kernel.org> wrote:
>
> On Fri, Nov 16, 2018 at 2:06 PM Rob Herring <robh@kernel.org> wrote:
> >
> > In preparation to remove the node name pointer from struct device_node,
> > convert printf users to use the %pOFn format specifier.
> >
> > Cc: Sean Wang <sean.wang@kernel.org>
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > Cc: Matthias Brugger <matthias.bgg@gmail.com>
> > Cc: linux-mediatek@lists.infradead.org
> > Cc: linux-gpio@vger.kernel.org
> > Cc: linux-arm-kernel@lists.infradead.org
> > Signed-off-by: Rob Herring <robh@kernel.org>
>
> Acked-by: Sean Wang <sean.wang@kernel.org>

BTW, messages to you bounce:

<sean.wang@mediatek.com> (expanded from <sean.wang@kernel.org>): host
    mailgw01.mediatek.com[216.200.240.184] said: 550 Relaying mail to
    sean.wang@mediatek.com is not allowed (in reply to RCPT TO command)

Perhaps you need your kernel.org account to route somewhere else.

Rob

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] pinctrl: mediatek: Convert to using %pOFn instead of device_node.name
  2018-11-19 19:07     ` Rob Herring
@ 2018-11-19 19:26       ` Sean Wang
  0 siblings, 0 replies; 11+ messages in thread
From: Sean Wang @ 2018-11-19 19:26 UTC (permalink / raw)
  To: robh
  Cc: Linus Walleij, devicetree, linux-kernel, Matthias Brugger,
	linux-mediatek, linux-gpio, linux-arm-kernel

On Mon, Nov 19, 2018 at 11:07 AM Rob Herring <robh@kernel.org> wrote:
>
> On Fri, Nov 16, 2018 at 5:46 PM Sean Wang <sean.wang@kernel.org> wrote:
> >
> > On Fri, Nov 16, 2018 at 2:06 PM Rob Herring <robh@kernel.org> wrote:
> > >
> > > In preparation to remove the node name pointer from struct device_node,
> > > convert printf users to use the %pOFn format specifier.
> > >
> > > Cc: Sean Wang <sean.wang@kernel.org>
> > > Cc: Linus Walleij <linus.walleij@linaro.org>
> > > Cc: Matthias Brugger <matthias.bgg@gmail.com>
> > > Cc: linux-mediatek@lists.infradead.org
> > > Cc: linux-gpio@vger.kernel.org
> > > Cc: linux-arm-kernel@lists.infradead.org
> > > Signed-off-by: Rob Herring <robh@kernel.org>
> >
> > Acked-by: Sean Wang <sean.wang@kernel.org>
>
> BTW, messages to you bounce:
>
> <sean.wang@mediatek.com> (expanded from <sean.wang@kernel.org>): host
>     mailgw01.mediatek.com[216.200.240.184] said: 550 Relaying mail to
>     sean.wang@mediatek.com is not allowed (in reply to RCPT TO command)
>
> Perhaps you need your kernel.org account to route somewhere else.
>
> Rob

Thanks. I've found the issue. Will fix it soon.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: macintosh: windfarm: Another convert to using %pOFn instead of device_node.name
  2018-11-16 22:05 ` [PATCH] macintosh: windfarm: Another convert " Rob Herring
@ 2018-12-07 13:07   ` Michael Ellerman
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Ellerman @ 2018-12-07 13:07 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree, linuxppc-dev, linux-kernel

On Fri, 2018-11-16 at 22:05:39 UTC, Rob Herring wrote:
> In preparation to remove the node name pointer from struct device_node,
> convert printf users to use the %pOFn format specifier.
> 
> Convert the open coded iterating thru child nodes to
> for_each_child_of_node() while we're here.
> 
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Rob Herring <robh@kernel.org>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/15b680c474afd54dac05530d8fed41

cheers

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-12-07 13:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-16 22:05 [PATCH] atm: Convert to using %pOFn instead of device_node.name Rob Herring
2018-11-16 22:05 ` [PATCH] hwmon: ina3221: " Rob Herring
2018-11-18 22:43   ` Guenter Roeck
2018-11-16 22:05 ` [PATCH] macintosh: windfarm: Another convert " Rob Herring
2018-12-07 13:07   ` Michael Ellerman
2018-11-16 22:05 ` [PATCH] pinctrl: mediatek: Convert " Rob Herring
2018-11-16 23:46   ` Sean Wang
2018-11-19 19:07     ` Rob Herring
2018-11-19 19:26       ` Sean Wang
2018-11-19 14:14   ` Linus Walleij
2018-11-18  5:52 ` [PATCH] atm: " David Miller

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