Skip to contentSkip to conversation

x86: Convert to using %pOF instead of full_name

PATCH New Rob Herring 2 participants 2 messages Jul 18, 2017 – Jul 21, 2017 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: 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 Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
---
 arch/x86/kernel/devicetree.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/x86/kernel/devicetree.c +1 -2
index 3fe45f84ced4..d7b2ab7f7c60 100644
@@ -235,8 +235,7 @@ static void __init dtb_add_ioapic(struct device_node *dn)
 
 	ret = of_address_to_resource(dn, 0, &r);
 	if (ret) {
-		printk(KERN_ERR "Can't obtain address from node %s.\n",
-				dn->full_name);
+		printk(KERN_ERR "Can't obtain address from node %pOF.\n", dn);
 		return;
 	}
 	mp_register_ioapic(++ioapic_id, r.start, gsi_top, &cfg);

--
2.11.0

#1 lore raw

[tip:x86/urgent] x86/devicetree: Convert to using %pOF instead of ->full_name

x86/devicetree: Convert to using %pOF instead of ->full_name
Commit-ID:  db15e7f27369b81b6605a546d54eb844f87370a5
Gitweb:     http://git.kernel.org/tip/db15e7f27369b81b6605a546d54eb844f87370a5
Author:     Rob Herring <[email protected]>
AuthorDate: Tue, 18 Jul 2017 16:42:47 -0500
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 21 Jul 2017 10:14:15 +0200

x86/devicetree: 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 device node.

Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
[ Clarify the error message while at it, as 'node' is ambiguous. ]
---
 arch/x86/kernel/devicetree.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/x86/kernel/devicetree.c +1 -2
index 3fe45f8..cbf1f6b 100644
@@ -235,8 +235,7 @@ static void __init dtb_add_ioapic(struct device_node *dn)
 
 	ret = of_address_to_resource(dn, 0, &r);
 	if (ret) {
-		printk(KERN_ERR "Can't obtain address from node %s.\n",
-				dn->full_name);
+		printk(KERN_ERR "Can't obtain address from device node %pOF.\n", dn);
 		return;
 	}
 	mp_register_ioapic(++ioapic_id, r.start, gsi_top, &cfg);