atm: Convert to using %pOFn instead of device_node.name
Subsystems (9)
PATCH 1/1 atm: Convert to using %pOFn instead of device_node.name
In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/atm/fore200e.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/atm/fore200e.c +2 -2
@@ -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 = {
Signature · 1 line
2.19.1
PATCH 1/1 hwmon: ina3221: Convert to using %pOFn instead of device_node.name
In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/hwmon/ina3221.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/hwmon/ina3221.c +4 -4
@@ -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;
Signature · 1 line
2.19.1
Re: [PATCH] hwmon: ina3221: Convert to using %pOFn instead of device_node.name
Quoted 7 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Jean Delvare <[email protected]>Cc Guenter Roeck <[email protected]>Signed-off-by Rob Herring <[email protected]>
Applied to hwmon-next.
Thanks,
Guenter
Quoted 32 lines
--- drivers/hwmon/ina3221.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/hwmon/ina3221.c +4
-4@@ -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 1/1 macintosh: windfarm: Another convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn 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.
--- drivers/macintosh/windfarm_fcu_controls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/macintosh/windfarm_fcu_controls.c +3 -3
@@ -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") ||
Signature · 1 line
2.19.1
Michael Ellerman
AppliedRe: macintosh: windfarm: Another convert to using %pOFn instead of device_node.name
Quoted 9 lines · Rob Herring
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 <[email protected]>Signed-off-by Rob Herring <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/15b680c474afd54dac05530d8fed41
cheers
PATCH 1/1 pinctrl: mediatek: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/pinctrl/mediatek/pinctrl-paris.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/mediatek/pinctrl-paris.c +2 -2
@@ -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 ; }
Signature · 1 line
2.19.1
Re: [PATCH] pinctrl: mediatek: Convert to using %pOFn instead of device_node.name
Quoted 11 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Sean Wang <[email protected]>Cc Linus Walleij <[email protected]>Cc Matthias Brugger <[email protected]>Cc linux-mediatek at lists.infradead.orgCc linux-gpio at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgSigned-off-by Rob Herring <[email protected]>
Quoted 22 lines
--- drivers/pinctrl/mediatek/pinctrl-paris.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/pinctrl/mediatek/pinctrl-paris.c +2
-3@@ -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
Re: [PATCH] pinctrl: mediatek: Convert to using %pOFn instead of device_node.name
Quoted 14 lines · Sean Wang
Quoted 11 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Sean Wang <[email protected]>Cc Linus Walleij <[email protected]>Cc Matthias Brugger <[email protected]>Cc linux-mediatek at lists.infradead.orgCc linux-gpio at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgSigned-off-by Rob Herring <[email protected]>
Quoted 1 line
Acked-by Sean Wang <[email protected]>
BTW, messages to you bounce:
<[email protected]> (expanded from <[email protected]>): host
mailgw01.mediatek.com[216.200.240.184] said: 550 Relaying mail to sean.wang at mediatek.com is not allowed (in reply to RCPT TO command)
Perhaps you need your kernel.org account to route somewhere else.
Rob
Sean Wang
maintainerRe: [PATCH] pinctrl: mediatek: Convert to using %pOFn instead of device_node.name
Quoted 20 lines · Rob Herring
Quoted 14 lines · Sean Wang
Quoted 11 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Sean Wang <[email protected]>Cc Linus Walleij <[email protected]>Cc Matthias Brugger <[email protected]>Cc linux-mediatek at lists.infradead.orgCc linux-gpio at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgSigned-off-by Rob Herring <[email protected]>Quoted 1 line
Acked-by Sean Wang <[email protected]>BTW, messages to you bounce:
Quoted 7 lines
<[email protected]> (expanded from <[email protected]>): host
mailgw01.mediatek.com[216.200.240.184] said: 550 Relaying mail to sean.wang at 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.
Re: [PATCH] pinctrl: mediatek: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringQuoted 10 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Sean Wang <[email protected]>Cc Linus Walleij <[email protected]>Cc Matthias Brugger <[email protected]>Cc linux-mediatek at lists.infradead.orgCc linux-gpio at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgSigned-off-by Rob Herring <[email protected]>
Patch applied with Sean's ACK.
Yours,
Linus Walleij
From: Rob Herring <[email protected]>
Date: Fri, 16 Nov 2018 16:05:37 -0600
Quoted 7 lines
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Chas Williams <[email protected]>Signed-off-by Rob Herring <[email protected]>
Applied to net-next.