bus: Convert to using %pOF instead of full_name
Subsystems (2)
PATCH 1/1 bus: 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.
--- drivers/bus/arm-cci.c | 12 ++++++------ drivers/bus/imx-weim.c | 8 ++++---- drivers/bus/sunxi-rsb.c | 22 +++++++++++----------- 3 files changed, 21 insertions(+), 21 deletions(-)
drivers/bus/arm-cci.c +6 -6
@@ -2124,8 +2124,8 @@ int notrace __cci_control_port_by_device(struct device_node *dn, bool enable)return -ENODEV ; port =__cci_ace_get_port (dn,ACE_LITE_PORT ); -if (WARN_ONCE (port <0 ,"node %s ACE lite port look-up failure\n" , - dn->full_name)) +if (WARN_ONCE (port <0 ,"node %pOF ACE lite port look-up failure\n" , + dn))return -ENODEV ;cci_port_control (port, enable);return 0 ;
@@ -2200,14 +2200,14 @@ static int cci_probe_ports(struct device_node *np)if (of_property_read_string (cp,"interface-type" , &match_str)) { -WARN (1 ,"node %s missing interface-type property\n" , - cp->full_name); +WARN (1 ,"node %pOF missing interface-type property\n" , + cp);continue ; } is_ace =strcmp (match_str,"ace" ) ==0 ;if (!is_ace &&strcmp (match_str,"ace-lite" )) { -WARN (1 ,"node %s containing invalid interface-type property, skipping it\n" , - cp->full_name); +WARN (1 ,"node %pOF containing invalid interface-type property, skipping it\n" , + cp);continue ; }
drivers/bus/imx-weim.c +4 -4
@@ -156,8 +156,8 @@ static int __init weim_parse_dt(struct platform_device *pdev, ret =weim_timing_setup (child, base, devtype);if (ret) -dev_warn (&pdev->dev,"%s set timing failed.\n" , - child->full_name); +dev_warn (&pdev->dev,"%pOF set timing failed.\n" , + child);else have_child =1 ; }
@@ -166,8 +166,8 @@ static int __init weim_parse_dt(struct platform_device *pdev, ret =of_platform_default_populate (pdev->dev.of_node,NULL , &pdev->dev);if (ret) -dev_err (&pdev->dev,"%s fail to create devices.\n" , - pdev->dev.of_node->full_name); +dev_err (&pdev->dev,"%pOF fail to create devices.\n" , + pdev->dev.of_node);return ret; }
drivers/bus/sunxi-rsb.c +11 -11
@@ -556,20 +556,20 @@ static int of_rsb_register_devices(struct sunxi_rsb *rsb)/* Runtime addresses for all slaves should be set first */ for_each_available_child_of_node (np, child) { -dev_dbg (dev,"setting child %s runtime address\n" , - child->full_name); +dev_dbg (dev,"setting child %pOF runtime address\n" , + child); ret =of_property_read_u32 (child,"reg" , &hwaddr);if (ret) { -dev_err (dev,"%s: invalid 'reg' property: %d\n" , - child->full_name, ret); +dev_err (dev,"%pOF: invalid 'reg' property: %d\n" , + child, ret);continue ; } rtaddr =sunxi_rsb_get_rtaddr (hwaddr);if (!rtaddr) { -dev_err (dev,"%s: unknown hardware device address\n" , - child->full_name); +dev_err (dev,"%pOF: unknown hardware device address\n" , + child);continue ; }
@@ -586,15 +586,15 @@ static int of_rsb_register_devices(struct sunxi_rsb *rsb)/* send command */ ret =_sunxi_rsb_run_xfer (rsb);if (ret) -dev_warn (dev,"%s: set runtime address failed: %d\n" , - child->full_name, ret); +dev_warn (dev,"%pOF: set runtime address failed: %d\n" , + child, ret); }/* Then we start adding devices and probing them */ for_each_available_child_of_node (np, child) {struct sunxi_rsb_device *rdev; -dev_dbg (dev,"adding child %s\n" , child->full_name); +dev_dbg (dev,"adding child %pOF\n" , child); ret =of_property_read_u32 (child,"reg" , &hwaddr);if (ret)
@@ -606,8 +606,8 @@ static int of_rsb_register_devices(struct sunxi_rsb *rsb) rdev =sunxi_rsb_device_create (rsb, child, hwaddr, rtaddr);if (IS_ERR (rdev)) -dev_err (dev,"failed to add child device %s: %ld\n" , - child->full_name,PTR_ERR (rdev)); +dev_err (dev,"failed to add child device %pOF: %ld\n" , + child,PTR_ERR (rdev)); }return 0 ;
--
2.11.0
Quoted 4 lines · Rob Herring
Now that we have a custom printf format specifier, convert users of
full_nameto use %pOF instead. This is preparation to remove storing of the full path string for each node.
Quoted 8 lines
Signed-off-by Rob Herring <[email protected]>Cc Maxime Ripard <[email protected]>Cc Chen-Yu Tsai <[email protected]>Cc linux-arm-kernel at lists.infradead.org--- drivers/bus/arm-cci.c | 12 ++++++------ drivers/bus/imx-weim.c | 8 ++++---- drivers/bus/sunxi-rsb.c | 22 +++++++++++-----------
for sunxi-rsb:
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170719/7005f66d/attachment.sig>
Arnd Bergmann
AppliedQuoted 14 lines · Maxime Ripard
Quoted 4 lines · Rob Herring
Now that we have a custom printf format specifier, convert users of
full_nameto use %pOF instead. This is preparation to remove storing of the full path string for each node.Quoted 8 lines
Signed-off-by Rob Herring <[email protected]>Cc Maxime Ripard <[email protected]>Cc Chen-Yu Tsai <[email protected]>Cc linux-arm-kernel at lists.infradead.org--- drivers/bus/arm-cci.c | 12 ++++++------ drivers/bus/imx-weim.c | 8 ++++---- drivers/bus/sunxi-rsb.c | 22 +++++++++++-----------
Quoted 3 lines
for sunxi-rsb:
Acked-by Maxime Ripard <[email protected]>
Applied to next/drivers, thanks!
Arnd
Quoted 8 lines · Rob Herring
Now that we have a custom printf format specifier, convert users of
full_nameto use %pOF instead. This is preparation to remove storing of the full path string for each node.Signed-off-by Rob Herring <[email protected]>Cc Maxime Ripard <[email protected]>Cc Chen-Yu Tsai <[email protected]>Cc linux-arm-kernel at lists.infradead.org
Quoted 5 lines
--- drivers/bus/arm-cci.c | 12 ++++++------ drivers/bus/imx-weim.c | 8 ++++---- drivers/bus/sunxi-rsb.c | 22 +++++++++++----------- 3 files changed, 21 insertions(+), 21 deletions(-)
Arnd, Olof,
Can you please apply this one.
Rob