linux/drivers/of
Pantelis Antoniou ce4fecf1fe vsprintf: Add %p extension "%pOF" for device tree
90% of the usage of device node's full_name is printing it out in a
kernel message. However, storing the full path for every node is
wasteful and redundant. With a custom format specifier, we can generate
the full path at run-time and eventually remove the full path from every
node.

For instance typical use is:
	pr_info("Frobbing node %s\n", node->full_name);

Which can be written now as:
	pr_info("Frobbing node %pOF\n", node);

'%pO' is the base specifier to represent kobjects with '%pOF'
representing struct device_node. Currently, struct device_node is the
only supported type of kobject.

More fine-grained control of formatting includes printing the name,
flags, path-spec name and others, explained in the documentation entry.

Originally written by Pantelis, but pretty much rewrote the core
function using existing string/number functions. The 2 passes were
unnecessary and have been removed. Also, updated the checkpatch.pl
check. The unittest code was written by Grant Likely.

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Acked-by: Joe Perches <joe@perches.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2017-06-27 12:36:40 -05:00
..
unittest-data vsprintf: Add %p extension "%pOF" for device tree 2017-06-27 12:36:40 -05:00
address.c of: address.c header comment typo 2017-06-22 11:15:00 -05:00
base.c of: find_node_by_full_name rewrite to compare each level 2017-06-22 12:38:29 -05:00
device.c IOMMU Updates for Linux v4.12 2017-05-09 15:15:47 -07:00
dynamic.c of: make __of_attach_node() static 2017-06-22 11:16:35 -05:00
fdt_address.c of: use pr_fmt prefix for all console printing 2016-07-18 16:57:42 -05:00
fdt.c of: fdt.c header comment typo 2017-06-22 11:14:56 -05:00
irq.c of: irq: use of_irq_get() in of_irq_to_resource() 2017-05-16 09:11:22 -05:00
Kconfig mtd: Kill the OF_MTD Kconfig option 2016-09-23 09:35:16 +02:00
Makefile MTD updates for v4.7: 2016-05-24 11:00:20 -07:00
of_mdio.c mdio_bus: Issue GPIO RESET to PHYs. 2017-04-24 12:40:24 -04:00
of_net.c
of_numa.c of: fix "/cpus" reference leak in of_numa_parse_cpu_nodes() 2017-04-18 11:04:12 -05:00
of_pci_irq.c of/irq: improve error report on irq discovery process failure 2017-01-09 09:52:17 -06:00
of_pci.c of/pci: Remove unused MSI controller helpers 2017-03-14 15:10:11 -05:00
of_private.h of: find_node_by_full_name rewrite to compare each level 2017-06-22 12:38:29 -05:00
of_reserved_mem.c of: fix sparse warnings in fdt, irq, reserved mem, and resolver code 2017-05-04 14:01:13 -05:00
overlay.c of: detect invalid phandle in overlay 2017-06-22 11:19:09 -05:00
pdt.c
platform.c of: use kbasename instead of open coding 2017-06-22 12:37:46 -05:00
resolver.c of: find_node_by_full_name rewrite to compare each level 2017-06-22 12:38:29 -05:00
unittest.c vsprintf: Add %p extension "%pOF" for device tree 2017-06-27 12:36:40 -05:00