powerpc: 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.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Scott Wood <oss@buserror.net>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linuxppc-dev@lists.ozlabs.org
Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Rob Herring 2017-08-21 10:16:47 -05:00 committed by Michael Ellerman
parent bcf21e3a97
commit b7c670d673
79 changed files with 461 additions and 487 deletions

View File

@ -253,7 +253,7 @@ int __init btext_find_display(int allow_nonstdout)
for_each_node_by_type(np, "display") { for_each_node_by_type(np, "display") {
if (of_get_property(np, "linux,opened", NULL)) { if (of_get_property(np, "linux,opened", NULL)) {
printk("trying %s ...\n", np->full_name); printk("trying %pOF ...\n", np);
rc = btext_initialize(np); rc = btext_initialize(np);
printk("result: %d\n", rc); printk("result: %d\n", rc);
} }

View File

@ -167,10 +167,10 @@ static void release_cache_debugcheck(struct cache *cache)
list_for_each_entry(iter, &cache_list, list) list_for_each_entry(iter, &cache_list, list)
WARN_ONCE(iter->next_local == cache, WARN_ONCE(iter->next_local == cache,
"cache for %s(%s) refers to cache for %s(%s)\n", "cache for %pOF(%s) refers to cache for %pOF(%s)\n",
iter->ofnode->full_name, iter->ofnode,
cache_type_string(iter), cache_type_string(iter),
cache->ofnode->full_name, cache->ofnode,
cache_type_string(cache)); cache_type_string(cache));
} }
@ -179,8 +179,8 @@ static void release_cache(struct cache *cache)
if (!cache) if (!cache)
return; return;
pr_debug("freeing L%d %s cache for %s\n", cache->level, pr_debug("freeing L%d %s cache for %pOF\n", cache->level,
cache_type_string(cache), cache->ofnode->full_name); cache_type_string(cache), cache->ofnode);
release_cache_debugcheck(cache); release_cache_debugcheck(cache);
list_del(&cache->list); list_del(&cache->list);
@ -194,8 +194,8 @@ static void cache_cpu_set(struct cache *cache, int cpu)
while (next) { while (next) {
WARN_ONCE(cpumask_test_cpu(cpu, &next->shared_cpu_map), WARN_ONCE(cpumask_test_cpu(cpu, &next->shared_cpu_map),
"CPU %i already accounted in %s(%s)\n", "CPU %i already accounted in %pOF(%s)\n",
cpu, next->ofnode->full_name, cpu, next->ofnode,
cache_type_string(next)); cache_type_string(next));
cpumask_set_cpu(cpu, &next->shared_cpu_map); cpumask_set_cpu(cpu, &next->shared_cpu_map);
next = next->next_local; next = next->next_local;
@ -355,7 +355,7 @@ static int cache_is_unified_d(const struct device_node *np)
*/ */
static struct cache *cache_do_one_devnode_unified(struct device_node *node, int level) static struct cache *cache_do_one_devnode_unified(struct device_node *node, int level)
{ {
pr_debug("creating L%d ucache for %s\n", level, node->full_name); pr_debug("creating L%d ucache for %pOF\n", level, node);
return new_cache(cache_is_unified_d(node), level, node); return new_cache(cache_is_unified_d(node), level, node);
} }
@ -365,8 +365,8 @@ static struct cache *cache_do_one_devnode_split(struct device_node *node,
{ {
struct cache *dcache, *icache; struct cache *dcache, *icache;
pr_debug("creating L%d dcache and icache for %s\n", level, pr_debug("creating L%d dcache and icache for %pOF\n", level,
node->full_name); node);
dcache = new_cache(CACHE_TYPE_DATA, level, node); dcache = new_cache(CACHE_TYPE_DATA, level, node);
icache = new_cache(CACHE_TYPE_INSTRUCTION, level, node); icache = new_cache(CACHE_TYPE_INSTRUCTION, level, node);
@ -679,7 +679,6 @@ static struct kobj_type cache_index_type = {
static void cacheinfo_create_index_opt_attrs(struct cache_index_dir *dir) static void cacheinfo_create_index_opt_attrs(struct cache_index_dir *dir)
{ {
const char *cache_name;
const char *cache_type; const char *cache_type;
struct cache *cache; struct cache *cache;
char *buf; char *buf;
@ -690,7 +689,6 @@ static void cacheinfo_create_index_opt_attrs(struct cache_index_dir *dir)
return; return;
cache = dir->cache; cache = dir->cache;
cache_name = cache->ofnode->full_name;
cache_type = cache_type_string(cache); cache_type = cache_type_string(cache);
/* We don't want to create an attribute that can't provide a /* We don't want to create an attribute that can't provide a
@ -707,14 +705,14 @@ static void cacheinfo_create_index_opt_attrs(struct cache_index_dir *dir)
rc = attr->show(&dir->kobj, attr, buf); rc = attr->show(&dir->kobj, attr, buf);
if (rc <= 0) { if (rc <= 0) {
pr_debug("not creating %s attribute for " pr_debug("not creating %s attribute for "
"%s(%s) (rc = %zd)\n", "%pOF(%s) (rc = %zd)\n",
attr->attr.name, cache_name, attr->attr.name, cache->ofnode,
cache_type, rc); cache_type, rc);
continue; continue;
} }
if (sysfs_create_file(&dir->kobj, &attr->attr)) if (sysfs_create_file(&dir->kobj, &attr->attr))
pr_debug("could not create %s attribute for %s(%s)\n", pr_debug("could not create %s attribute for %pOF(%s)\n",
attr->attr.name, cache_name, cache_type); attr->attr.name, cache->ofnode, cache_type);
} }
kfree(buf); kfree(buf);
@ -831,8 +829,8 @@ static void cache_cpu_clear(struct cache *cache, int cpu)
struct cache *next = cache->next_local; struct cache *next = cache->next_local;
WARN_ONCE(!cpumask_test_cpu(cpu, &cache->shared_cpu_map), WARN_ONCE(!cpumask_test_cpu(cpu, &cache->shared_cpu_map),
"CPU %i not accounted in %s(%s)\n", "CPU %i not accounted in %pOF(%s)\n",
cpu, cache->ofnode->full_name, cpu, cache->ofnode,
cache_type_string(cache)); cache_type_string(cache));
cpumask_clear_cpu(cpu, &cache->shared_cpu_map); cpumask_clear_cpu(cpu, &cache->shared_cpu_map);

View File

@ -193,7 +193,7 @@ void iowa_register_bus(struct pci_controller *phb, struct ppc_pci_io *ops,
if (iowa_bus_count >= IOWA_MAX_BUS) { if (iowa_bus_count >= IOWA_MAX_BUS) {
pr_err("IOWA:Too many pci bridges, " pr_err("IOWA:Too many pci bridges, "
"workarounds disabled for %s\n", np->full_name); "workarounds disabled for %pOF\n", np);
return; return;
} }
@ -208,6 +208,6 @@ void iowa_register_bus(struct pci_controller *phb, struct ppc_pci_io *ops,
iowa_bus_count++; iowa_bus_count++;
pr_debug("IOWA:[%d]Add bus, %s.\n", iowa_bus_count-1, np->full_name); pr_debug("IOWA:[%d]Add bus, %pOF.\n", iowa_bus_count-1, np);
} }

View File

@ -164,7 +164,7 @@ void __init isa_bridge_find_early(struct pci_controller *hose)
/* Set the global ISA io base to indicate we have an ISA bridge */ /* Set the global ISA io base to indicate we have an ISA bridge */
isa_io_base = ISA_IO_BASE; isa_io_base = ISA_IO_BASE;
pr_debug("ISA bridge (early) is %s\n", np->full_name); pr_debug("ISA bridge (early) is %pOF\n", np);
} }
/** /**
@ -187,15 +187,15 @@ void __init isa_bridge_init_non_pci(struct device_node *np)
pna = of_n_addr_cells(np); pna = of_n_addr_cells(np);
if (of_property_read_u32(np, "#address-cells", &na) || if (of_property_read_u32(np, "#address-cells", &na) ||
of_property_read_u32(np, "#size-cells", &ns)) { of_property_read_u32(np, "#size-cells", &ns)) {
pr_warn("ISA: Non-PCI bridge %s is missing address format\n", pr_warn("ISA: Non-PCI bridge %pOF is missing address format\n",
np->full_name); np);
return; return;
} }
/* Check it's a supported address format */ /* Check it's a supported address format */
if (na != 2 || ns != 1) { if (na != 2 || ns != 1) {
pr_warn("ISA: Non-PCI bridge %s has unsupported address format\n", pr_warn("ISA: Non-PCI bridge %pOF has unsupported address format\n",
np->full_name); np);
return; return;
} }
rs = na + ns + pna; rs = na + ns + pna;
@ -203,8 +203,8 @@ void __init isa_bridge_init_non_pci(struct device_node *np)
/* Grab the ranges property */ /* Grab the ranges property */
ranges = of_get_property(np, "ranges", &rlen); ranges = of_get_property(np, "ranges", &rlen);
if (ranges == NULL || rlen < rs) { if (ranges == NULL || rlen < rs) {
pr_warn("ISA: Non-PCI bridge %s has absent or invalid ranges\n", pr_warn("ISA: Non-PCI bridge %pOF has absent or invalid ranges\n",
np->full_name); np);
return; return;
} }
@ -220,8 +220,8 @@ void __init isa_bridge_init_non_pci(struct device_node *np)
/* Got something ? */ /* Got something ? */
if (!size || !pbasep) { if (!size || !pbasep) {
pr_warn("ISA: Non-PCI bridge %s has no usable IO range\n", pr_warn("ISA: Non-PCI bridge %pOF has no usable IO range\n",
np->full_name); np);
return; return;
} }
@ -233,15 +233,15 @@ void __init isa_bridge_init_non_pci(struct device_node *np)
/* Map pbase */ /* Map pbase */
pbase = of_translate_address(np, pbasep); pbase = of_translate_address(np, pbasep);
if (pbase == OF_BAD_ADDR) { if (pbase == OF_BAD_ADDR) {
pr_warn("ISA: Non-PCI bridge %s failed to translate IO base\n", pr_warn("ISA: Non-PCI bridge %pOF failed to translate IO base\n",
np->full_name); np);
return; return;
} }
/* We need page alignment */ /* We need page alignment */
if ((cbase & ~PAGE_MASK) || (pbase & ~PAGE_MASK)) { if ((cbase & ~PAGE_MASK) || (pbase & ~PAGE_MASK)) {
pr_warn("ISA: Non-PCI bridge %s has non aligned IO range\n", pr_warn("ISA: Non-PCI bridge %pOF has non aligned IO range\n",
np->full_name); np);
return; return;
} }
@ -255,7 +255,7 @@ void __init isa_bridge_init_non_pci(struct device_node *np)
__ioremap_at(pbase, (void *)ISA_IO_BASE, __ioremap_at(pbase, (void *)ISA_IO_BASE,
size, pgprot_val(pgprot_noncached(__pgprot(0)))); size, pgprot_val(pgprot_noncached(__pgprot(0))));
pr_debug("ISA: Non-PCI bridge is %s\n", np->full_name); pr_debug("ISA: Non-PCI bridge is %pOF\n", np);
} }
/** /**
@ -277,8 +277,8 @@ static void isa_bridge_find_late(struct pci_dev *pdev,
/* Set the global ISA io base to indicate we have an ISA bridge */ /* Set the global ISA io base to indicate we have an ISA bridge */
isa_io_base = ISA_IO_BASE; isa_io_base = ISA_IO_BASE;
pr_debug("ISA bridge (late) is %s on %s\n", pr_debug("ISA bridge (late) is %pOF on %s\n",
devnode->full_name, pci_name(pdev)); devnode, pci_name(pdev));
} }
/** /**

View File

@ -147,8 +147,8 @@ static int __init add_legacy_port(struct device_node *np, int want_index,
legacy_serial_ports[index].serial_out = tsi_serial_out; legacy_serial_ports[index].serial_out = tsi_serial_out;
} }
printk(KERN_DEBUG "Found legacy serial port %d for %s\n", printk(KERN_DEBUG "Found legacy serial port %d for %pOF\n",
index, np->full_name); index, np);
printk(KERN_DEBUG " %s=%llx, taddr=%llx, irq=%lx, clk=%d, speed=%d\n", printk(KERN_DEBUG " %s=%llx, taddr=%llx, irq=%lx, clk=%d, speed=%d\n",
(iotype == UPIO_PORT) ? "port" : "mem", (iotype == UPIO_PORT) ? "port" : "mem",
(unsigned long long)base, (unsigned long long)taddr, irq, (unsigned long long)base, (unsigned long long)taddr, irq,
@ -207,7 +207,7 @@ static int __init add_legacy_isa_port(struct device_node *np,
int index = -1; int index = -1;
u64 taddr; u64 taddr;
DBG(" -> add_legacy_isa_port(%s)\n", np->full_name); DBG(" -> add_legacy_isa_port(%pOF)\n", np);
/* Get the ISA port number */ /* Get the ISA port number */
reg = of_get_property(np, "reg", NULL); reg = of_get_property(np, "reg", NULL);
@ -256,7 +256,7 @@ static int __init add_legacy_pci_port(struct device_node *np,
unsigned int flags; unsigned int flags;
int iotype, index = -1, lindex = 0; int iotype, index = -1, lindex = 0;
DBG(" -> add_legacy_pci_port(%s)\n", np->full_name); DBG(" -> add_legacy_pci_port(%pOF)\n", np);
/* We only support ports that have a clock frequency properly /* We only support ports that have a clock frequency properly
* encoded in the device-tree (that is have an fcode). Anything * encoded in the device-tree (that is have an fcode). Anything
@ -374,7 +374,7 @@ void __init find_legacy_serial_ports(void)
if (path != NULL) { if (path != NULL) {
stdout = of_find_node_by_path(path); stdout = of_find_node_by_path(path);
if (stdout) if (stdout)
DBG("stdout is %s\n", stdout->full_name); DBG("stdout is %pOF\n", stdout);
} else { } else {
DBG(" no linux,stdout-path !\n"); DBG(" no linux,stdout-path !\n");
} }
@ -603,7 +603,7 @@ static int __init check_legacy_serial_console(void)
DBG(" can't find stdout package %s !\n", name); DBG(" can't find stdout package %s !\n", name);
return -ENODEV; return -ENODEV;
} }
DBG("stdout is %s\n", prom_stdout->full_name); DBG("stdout is %pOF\n", prom_stdout);
name = of_get_property(prom_stdout, "name", NULL); name = of_get_property(prom_stdout, "name", NULL);
if (!name) { if (!name) {

View File

@ -45,7 +45,7 @@ static int of_pci_phb_probe(struct platform_device *dev)
if (ppc_md.pci_setup_phb == NULL) if (ppc_md.pci_setup_phb == NULL)
return -ENODEV; return -ENODEV;
pr_info("Setting up PCI bus %s\n", dev->dev.of_node->full_name); pr_info("Setting up PCI bus %pOF\n", dev->dev.of_node);
/* Alloc and setup PHB data structure */ /* Alloc and setup PHB data structure */
phb = pcibios_alloc_controller(dev->dev.of_node); phb = pcibios_alloc_controller(dev->dev.of_node);

View File

@ -373,9 +373,8 @@ static int pci_read_irq_line(struct pci_dev *pci_dev)
if (virq) if (virq)
irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
} else { } else {
pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %pOF\n",
oirq.args_count, oirq.args[0], oirq.args[1], oirq.args_count, oirq.args[0], oirq.args[1], oirq.np);
of_node_full_name(oirq.np));
virq = irq_create_of_mapping(&oirq); virq = irq_create_of_mapping(&oirq);
} }
@ -741,8 +740,8 @@ void pci_process_bridge_OF_ranges(struct pci_controller *hose,
struct of_pci_range range; struct of_pci_range range;
struct of_pci_range_parser parser; struct of_pci_range_parser parser;
printk(KERN_INFO "PCI host bridge %s %s ranges:\n", printk(KERN_INFO "PCI host bridge %pOF %s ranges:\n",
dev->full_name, primary ? "(primary)" : ""); dev, primary ? "(primary)" : "");
/* Check for ranges property */ /* Check for ranges property */
if (of_pci_range_parser_init(&parser, dev)) if (of_pci_range_parser_init(&parser, dev))
@ -1556,8 +1555,8 @@ static void pcibios_setup_phb_resources(struct pci_controller *hose,
if (!res->flags) { if (!res->flags) {
pr_debug("PCI: I/O resource not set for host" pr_debug("PCI: I/O resource not set for host"
" bridge %s (domain %d)\n", " bridge %pOF (domain %d)\n",
hose->dn->full_name, hose->global_number); hose->dn, hose->global_number);
} else { } else {
offset = pcibios_io_space_offset(hose); offset = pcibios_io_space_offset(hose);
@ -1668,7 +1667,7 @@ void pcibios_scan_phb(struct pci_controller *hose)
struct device_node *node = hose->dn; struct device_node *node = hose->dn;
int mode; int mode;
pr_debug("PCI: Scanning PHB %s\n", of_node_full_name(node)); pr_debug("PCI: Scanning PHB %pOF\n", node);
/* Get some IO space for the new PHB */ /* Get some IO space for the new PHB */
pcibios_setup_phb_io_space(hose); pcibios_setup_phb_io_space(hose);

View File

@ -79,8 +79,8 @@ make_one_node_map(struct device_node* node, u8 pci_bus)
return; return;
bus_range = of_get_property(node, "bus-range", &len); bus_range = of_get_property(node, "bus-range", &len);
if (bus_range == NULL || len < 2 * sizeof(int)) { if (bus_range == NULL || len < 2 * sizeof(int)) {
printk(KERN_WARNING "Can't get bus-range for %s, " printk(KERN_WARNING "Can't get bus-range for %pOF, "
"assuming it starts at 0\n", node->full_name); "assuming it starts at 0\n", node);
pci_to_OF_bus_map[pci_bus] = 0; pci_to_OF_bus_map[pci_bus] = 0;
} else } else
pci_to_OF_bus_map[pci_bus] = bus_range[0]; pci_to_OF_bus_map[pci_bus] = bus_range[0];

View File

@ -111,7 +111,7 @@ int pcibios_unmap_io_space(struct pci_bus *bus)
if (hose->io_base_alloc == NULL) if (hose->io_base_alloc == NULL)
return 0; return 0;
pr_debug("IO unmapping for PHB %s\n", hose->dn->full_name); pr_debug("IO unmapping for PHB %pOF\n", hose->dn);
pr_debug(" alloc=0x%p\n", hose->io_base_alloc); pr_debug(" alloc=0x%p\n", hose->io_base_alloc);
/* This is a PHB, we fully unmap the IO area */ /* This is a PHB, we fully unmap the IO area */
@ -151,7 +151,7 @@ static int pcibios_map_phb_io_space(struct pci_controller *hose)
hose->io_base_virt = (void __iomem *)(area->addr + hose->io_base_virt = (void __iomem *)(area->addr +
hose->io_base_phys - phys_page); hose->io_base_phys - phys_page);
pr_debug("IO mapping for PHB %s\n", hose->dn->full_name); pr_debug("IO mapping for PHB %pOF\n", hose->dn);
pr_debug(" phys=0x%016llx, virt=0x%p (alloc=0x%p)\n", pr_debug(" phys=0x%016llx, virt=0x%p (alloc=0x%p)\n",
hose->io_base_phys, hose->io_base_virt, hose->io_base_alloc); hose->io_base_phys, hose->io_base_virt, hose->io_base_alloc);
pr_debug(" size=0x%016llx (alloc=0x%016lx)\n", pr_debug(" size=0x%016llx (alloc=0x%016lx)\n",

View File

@ -211,19 +211,19 @@ void of_scan_pci_bridge(struct pci_dev *dev)
unsigned int flags; unsigned int flags;
u64 size; u64 size;
pr_debug("of_scan_pci_bridge(%s)\n", node->full_name); pr_debug("of_scan_pci_bridge(%pOF)\n", node);
/* parse bus-range property */ /* parse bus-range property */
busrange = of_get_property(node, "bus-range", &len); busrange = of_get_property(node, "bus-range", &len);
if (busrange == NULL || len != 8) { if (busrange == NULL || len != 8) {
printk(KERN_DEBUG "Can't get bus-range for PCI-PCI bridge %s\n", printk(KERN_DEBUG "Can't get bus-range for PCI-PCI bridge %pOF\n",
node->full_name); node);
return; return;
} }
ranges = of_get_property(node, "ranges", &len); ranges = of_get_property(node, "ranges", &len);
if (ranges == NULL) { if (ranges == NULL) {
printk(KERN_DEBUG "Can't get ranges for PCI-PCI bridge %s\n", printk(KERN_DEBUG "Can't get ranges for PCI-PCI bridge %pOF\n",
node->full_name); node);
return; return;
} }
@ -233,8 +233,8 @@ void of_scan_pci_bridge(struct pci_dev *dev)
bus = pci_add_new_bus(dev->bus, dev, bus = pci_add_new_bus(dev->bus, dev,
of_read_number(busrange, 1)); of_read_number(busrange, 1));
if (!bus) { if (!bus) {
printk(KERN_ERR "Failed to create pci bus for %s\n", printk(KERN_ERR "Failed to create pci bus for %pOF\n",
node->full_name); node);
return; return;
} }
} }
@ -262,13 +262,13 @@ void of_scan_pci_bridge(struct pci_dev *dev)
res = bus->resource[0]; res = bus->resource[0];
if (res->flags) { if (res->flags) {
printk(KERN_ERR "PCI: ignoring extra I/O range" printk(KERN_ERR "PCI: ignoring extra I/O range"
" for bridge %s\n", node->full_name); " for bridge %pOF\n", node);
continue; continue;
} }
} else { } else {
if (i >= PCI_NUM_RESOURCES - PCI_BRIDGE_RESOURCES) { if (i >= PCI_NUM_RESOURCES - PCI_BRIDGE_RESOURCES) {
printk(KERN_ERR "PCI: too many memory ranges" printk(KERN_ERR "PCI: too many memory ranges"
" for bridge %s\n", node->full_name); " for bridge %pOF\n", node);
continue; continue;
} }
res = bus->resource[i]; res = bus->resource[i];
@ -307,7 +307,7 @@ static struct pci_dev *of_scan_pci_dev(struct pci_bus *bus,
struct eeh_dev *edev = pdn_to_eeh_dev(PCI_DN(dn)); struct eeh_dev *edev = pdn_to_eeh_dev(PCI_DN(dn));
#endif #endif
pr_debug(" * %s\n", dn->full_name); pr_debug(" * %pOF\n", dn);
if (!of_device_is_available(dn)) if (!of_device_is_available(dn))
return NULL; return NULL;
@ -350,8 +350,8 @@ static void __of_scan_bus(struct device_node *node, struct pci_bus *bus,
struct device_node *child; struct device_node *child;
struct pci_dev *dev; struct pci_dev *dev;
pr_debug("of_scan_bus(%s) bus no %d...\n", pr_debug("of_scan_bus(%pOF) bus no %d...\n",
node->full_name, bus->number); node, bus->number);
/* Scan direct children */ /* Scan direct children */
for_each_child_of_node(node, child) { for_each_child_of_node(node, child) {

View File

@ -481,7 +481,7 @@ void __init smp_setup_cpu_maps(void)
__be32 cpu_be; __be32 cpu_be;
int j, len; int j, len;
DBG(" * %s...\n", dn->full_name); DBG(" * %pOF...\n", dn);
intserv = of_get_property(dn, "ibm,ppc-interrupt-server#s", intserv = of_get_property(dn, "ibm,ppc-interrupt-server#s",
&len); &len);

View File

@ -278,8 +278,8 @@ static int __init cpm_init(void)
dcr_len = dcr_resource_len(np, 0); dcr_len = dcr_resource_len(np, 0);
if (dcr_base == 0 || dcr_len == 0) { if (dcr_base == 0 || dcr_len == 0) {
printk(KERN_ERR "cpm: could not parse dcr property for %s\n", printk(KERN_ERR "cpm: could not parse dcr property for %pOF\n",
np->full_name); np);
ret = -EINVAL; ret = -EINVAL;
goto node_put; goto node_put;
} }
@ -287,8 +287,8 @@ static int __init cpm_init(void)
cpm.dcr_host = dcr_map(np, dcr_base, dcr_len); cpm.dcr_host = dcr_map(np, dcr_base, dcr_len);
if (!DCR_MAP_OK(cpm.dcr_host)) { if (!DCR_MAP_OK(cpm.dcr_host)) {
printk(KERN_ERR "cpm: failed to map dcr property for %s\n", printk(KERN_ERR "cpm: failed to map dcr property for %pOF\n",
np->full_name); np);
ret = -EINVAL; ret = -EINVAL;
goto node_put; goto node_put;
} }

View File

@ -198,8 +198,7 @@ static int __init ppc4xx_add_gpiochips(void)
goto err; goto err;
continue; continue;
err: err:
pr_err("%s: registration failed with status %d\n", pr_err("%pOF: registration failed with status %d\n", np, ret);
np->full_name, ret);
kfree(ppc4xx_gc); kfree(ppc4xx_gc);
/* try others anyway */ /* try others anyway */
} }

View File

@ -233,8 +233,7 @@ static int ppc4xx_msi_probe(struct platform_device *dev)
/* Get MSI ranges */ /* Get MSI ranges */
err = of_address_to_resource(dev->dev.of_node, 0, &res); err = of_address_to_resource(dev->dev.of_node, 0, &res);
if (err) { if (err) {
dev_err(&dev->dev, "%s resource error!\n", dev_err(&dev->dev, "%pOF resource error!\n", dev->dev.of_node);
dev->dev.of_node->full_name);
goto error_out; goto error_out;
} }

View File

@ -127,9 +127,9 @@ static int __init ppc4xx_parse_dma_ranges(struct pci_controller *hose,
* within 32 bits space * within 32 bits space
*/ */
if (cpu_addr != 0 || pci_addr > 0xffffffff) { if (cpu_addr != 0 || pci_addr > 0xffffffff) {
printk(KERN_WARNING "%s: Ignored unsupported dma range" printk(KERN_WARNING "%pOF: Ignored unsupported dma range"
" 0x%016llx...0x%016llx -> 0x%016llx\n", " 0x%016llx...0x%016llx -> 0x%016llx\n",
hose->dn->full_name, hose->dn,
pci_addr, pci_addr + size - 1, cpu_addr); pci_addr, pci_addr + size - 1, cpu_addr);
continue; continue;
} }
@ -152,8 +152,7 @@ static int __init ppc4xx_parse_dma_ranges(struct pci_controller *hose,
/* We only support one global DMA offset */ /* We only support one global DMA offset */
if (dma_offset_set && pci_dram_offset != res->start) { if (dma_offset_set && pci_dram_offset != res->start) {
printk(KERN_ERR "%s: dma-ranges(s) mismatch\n", printk(KERN_ERR "%pOF: dma-ranges(s) mismatch\n", hose->dn);
hose->dn->full_name);
return -ENXIO; return -ENXIO;
} }
@ -161,17 +160,16 @@ static int __init ppc4xx_parse_dma_ranges(struct pci_controller *hose,
* DMA bounce buffers * DMA bounce buffers
*/ */
if (size < total_memory) { if (size < total_memory) {
printk(KERN_ERR "%s: dma-ranges too small " printk(KERN_ERR "%pOF: dma-ranges too small "
"(size=%llx total_memory=%llx)\n", "(size=%llx total_memory=%llx)\n",
hose->dn->full_name, size, (u64)total_memory); hose->dn, size, (u64)total_memory);
return -ENXIO; return -ENXIO;
} }
/* Check we are a power of 2 size and that base is a multiple of size*/ /* Check we are a power of 2 size and that base is a multiple of size*/
if ((size & (size - 1)) != 0 || if ((size & (size - 1)) != 0 ||
(res->start & (size - 1)) != 0) { (res->start & (size - 1)) != 0) {
printk(KERN_ERR "%s: dma-ranges unaligned\n", printk(KERN_ERR "%pOF: dma-ranges unaligned\n", hose->dn);
hose->dn->full_name);
return -ENXIO; return -ENXIO;
} }
@ -181,8 +179,8 @@ static int __init ppc4xx_parse_dma_ranges(struct pci_controller *hose,
if (res->end > 0xffffffff && if (res->end > 0xffffffff &&
!(of_device_is_compatible(hose->dn, "ibm,plb-pciex-460sx") !(of_device_is_compatible(hose->dn, "ibm,plb-pciex-460sx")
|| of_device_is_compatible(hose->dn, "ibm,plb-pciex-476fpe"))) { || of_device_is_compatible(hose->dn, "ibm,plb-pciex-476fpe"))) {
printk(KERN_ERR "%s: dma-ranges outside of 32 bits space\n", printk(KERN_ERR "%pOF: dma-ranges outside of 32 bits space\n",
hose->dn->full_name); hose->dn);
return -ENXIO; return -ENXIO;
} }
out: out:
@ -233,8 +231,7 @@ static int __init ppc4xx_setup_one_pci_PMM(struct pci_controller *hose,
*/ */
if ((plb_addr + size) > 0xffffffffull || !is_power_of_2(size) || if ((plb_addr + size) > 0xffffffffull || !is_power_of_2(size) ||
size < 0x1000 || (plb_addr & (size - 1)) != 0) { size < 0x1000 || (plb_addr & (size - 1)) != 0) {
printk(KERN_WARNING "%s: Resource out of range\n", printk(KERN_WARNING "%pOF: Resource out of range\n", hose->dn);
hose->dn->full_name);
return -1; return -1;
} }
ma = (0xffffffffu << ilog2(size)) | 1; ma = (0xffffffffu << ilog2(size)) | 1;
@ -266,8 +263,7 @@ static void __init ppc4xx_configure_pci_PMMs(struct pci_controller *hose,
if (!(res->flags & IORESOURCE_MEM)) if (!(res->flags & IORESOURCE_MEM))
continue; continue;
if (j > 2) { if (j > 2) {
printk(KERN_WARNING "%s: Too many ranges\n", printk(KERN_WARNING "%pOF: Too many ranges\n", hose->dn);
hose->dn->full_name);
break; break;
} }
@ -292,8 +288,8 @@ static void __init ppc4xx_configure_pci_PMMs(struct pci_controller *hose,
if (j <= 2 && !found_isa_hole && hose->isa_mem_size) if (j <= 2 && !found_isa_hole && hose->isa_mem_size)
if (ppc4xx_setup_one_pci_PMM(hose, reg, hose->isa_mem_phys, 0, if (ppc4xx_setup_one_pci_PMM(hose, reg, hose->isa_mem_phys, 0,
hose->isa_mem_size, 0, j) == 0) hose->isa_mem_size, 0, j) == 0)
printk(KERN_INFO "%s: Legacy ISA memory support enabled\n", printk(KERN_INFO "%pOF: Legacy ISA memory support enabled\n",
hose->dn->full_name); hose->dn);
} }
static void __init ppc4xx_configure_pci_PTMs(struct pci_controller *hose, static void __init ppc4xx_configure_pci_PTMs(struct pci_controller *hose,
@ -333,21 +329,20 @@ static void __init ppc4xx_probe_pci_bridge(struct device_node *np)
/* Check if device is enabled */ /* Check if device is enabled */
if (!of_device_is_available(np)) { if (!of_device_is_available(np)) {
printk(KERN_INFO "%s: Port disabled via device-tree\n", printk(KERN_INFO "%pOF: Port disabled via device-tree\n", np);
np->full_name);
return; return;
} }
/* Fetch config space registers address */ /* Fetch config space registers address */
if (of_address_to_resource(np, 0, &rsrc_cfg)) { if (of_address_to_resource(np, 0, &rsrc_cfg)) {
printk(KERN_ERR "%s: Can't get PCI config register base !", printk(KERN_ERR "%pOF: Can't get PCI config register base !",
np->full_name); np);
return; return;
} }
/* Fetch host bridge internal registers address */ /* Fetch host bridge internal registers address */
if (of_address_to_resource(np, 3, &rsrc_reg)) { if (of_address_to_resource(np, 3, &rsrc_reg)) {
printk(KERN_ERR "%s: Can't get PCI internal register base !", printk(KERN_ERR "%pOF: Can't get PCI internal register base !",
np->full_name); np);
return; return;
} }
@ -361,7 +356,7 @@ static void __init ppc4xx_probe_pci_bridge(struct device_node *np)
/* Map registers */ /* Map registers */
reg = ioremap(rsrc_reg.start, resource_size(&rsrc_reg)); reg = ioremap(rsrc_reg.start, resource_size(&rsrc_reg));
if (reg == NULL) { if (reg == NULL) {
printk(KERN_ERR "%s: Can't map registers !", np->full_name); printk(KERN_ERR "%pOF: Can't map registers !", np);
goto fail; goto fail;
} }
@ -423,8 +418,8 @@ static int __init ppc4xx_setup_one_pcix_POM(struct pci_controller *hose,
if (!is_power_of_2(size) || size < 0x1000 || if (!is_power_of_2(size) || size < 0x1000 ||
(plb_addr & (size - 1)) != 0) { (plb_addr & (size - 1)) != 0) {
printk(KERN_WARNING "%s: Resource out of range\n", printk(KERN_WARNING "%pOF: Resource out of range\n",
hose->dn->full_name); hose->dn);
return -1; return -1;
} }
@ -467,8 +462,7 @@ static void __init ppc4xx_configure_pcix_POMs(struct pci_controller *hose,
if (!(res->flags & IORESOURCE_MEM)) if (!(res->flags & IORESOURCE_MEM))
continue; continue;
if (j > 1) { if (j > 1) {
printk(KERN_WARNING "%s: Too many ranges\n", printk(KERN_WARNING "%pOF: Too many ranges\n", hose->dn);
hose->dn->full_name);
break; break;
} }
@ -493,8 +487,8 @@ static void __init ppc4xx_configure_pcix_POMs(struct pci_controller *hose,
if (j <= 1 && !found_isa_hole && hose->isa_mem_size) if (j <= 1 && !found_isa_hole && hose->isa_mem_size)
if (ppc4xx_setup_one_pcix_POM(hose, reg, hose->isa_mem_phys, 0, if (ppc4xx_setup_one_pcix_POM(hose, reg, hose->isa_mem_phys, 0,
hose->isa_mem_size, 0, j) == 0) hose->isa_mem_size, 0, j) == 0)
printk(KERN_INFO "%s: Legacy ISA memory support enabled\n", printk(KERN_INFO "%pOF: Legacy ISA memory support enabled\n",
hose->dn->full_name); hose->dn);
} }
static void __init ppc4xx_configure_pcix_PIMs(struct pci_controller *hose, static void __init ppc4xx_configure_pcix_PIMs(struct pci_controller *hose,
@ -539,14 +533,14 @@ static void __init ppc4xx_probe_pcix_bridge(struct device_node *np)
/* Fetch config space registers address */ /* Fetch config space registers address */
if (of_address_to_resource(np, 0, &rsrc_cfg)) { if (of_address_to_resource(np, 0, &rsrc_cfg)) {
printk(KERN_ERR "%s:Can't get PCI-X config register base !", printk(KERN_ERR "%pOF: Can't get PCI-X config register base !",
np->full_name); np);
return; return;
} }
/* Fetch host bridge internal registers address */ /* Fetch host bridge internal registers address */
if (of_address_to_resource(np, 3, &rsrc_reg)) { if (of_address_to_resource(np, 3, &rsrc_reg)) {
printk(KERN_ERR "%s: Can't get PCI-X internal register base !", printk(KERN_ERR "%pOF: Can't get PCI-X internal register base !",
np->full_name); np);
return; return;
} }
@ -568,7 +562,7 @@ static void __init ppc4xx_probe_pcix_bridge(struct device_node *np)
/* Map registers */ /* Map registers */
reg = ioremap(rsrc_reg.start, resource_size(&rsrc_reg)); reg = ioremap(rsrc_reg.start, resource_size(&rsrc_reg));
if (reg == NULL) { if (reg == NULL) {
printk(KERN_ERR "%s: Can't map registers !", np->full_name); printk(KERN_ERR "%pOF: Can't map registers !", np);
goto fail; goto fail;
} }
@ -1246,8 +1240,8 @@ static void __init ppc460sx_pciex_check_link(struct ppc4xx_pciex_port *port)
mbase = ioremap(port->cfg_space.start + 0x10000000, 0x1000); mbase = ioremap(port->cfg_space.start + 0x10000000, 0x1000);
if (mbase == NULL) { if (mbase == NULL) {
printk(KERN_ERR "%s: Can't map internal config space !", printk(KERN_ERR "%pOF: Can't map internal config space !",
port->node->full_name); port->node);
goto done; goto done;
} }
@ -1448,8 +1442,7 @@ static int __init ppc4xx_pciex_check_core_init(struct device_node *np)
ppc4xx_pciex_hwops = &ppc_476fpe_pcie_hwops; ppc4xx_pciex_hwops = &ppc_476fpe_pcie_hwops;
#endif #endif
if (ppc4xx_pciex_hwops == NULL) { if (ppc4xx_pciex_hwops == NULL) {
printk(KERN_WARNING "PCIE: unknown host type %s\n", printk(KERN_WARNING "PCIE: unknown host type %pOF\n", np);
np->full_name);
return -ENODEV; return -ENODEV;
} }
@ -1730,8 +1723,7 @@ static int __init ppc4xx_setup_one_pciex_POM(struct ppc4xx_pciex_port *port,
(index < 2 && size < 0x100000) || (index < 2 && size < 0x100000) ||
(index == 2 && size < 0x100) || (index == 2 && size < 0x100) ||
(plb_addr & (size - 1)) != 0) { (plb_addr & (size - 1)) != 0) {
printk(KERN_WARNING "%s: Resource out of range\n", printk(KERN_WARNING "%pOF: Resource out of range\n", hose->dn);
hose->dn->full_name);
return -1; return -1;
} }
@ -1807,8 +1799,8 @@ static void __init ppc4xx_configure_pciex_POMs(struct ppc4xx_pciex_port *port,
if (!(res->flags & IORESOURCE_MEM)) if (!(res->flags & IORESOURCE_MEM))
continue; continue;
if (j > 1) { if (j > 1) {
printk(KERN_WARNING "%s: Too many ranges\n", printk(KERN_WARNING "%pOF: Too many ranges\n",
port->node->full_name); port->node);
break; break;
} }
@ -1834,8 +1826,8 @@ static void __init ppc4xx_configure_pciex_POMs(struct ppc4xx_pciex_port *port,
if (ppc4xx_setup_one_pciex_POM(port, hose, mbase, if (ppc4xx_setup_one_pciex_POM(port, hose, mbase,
hose->isa_mem_phys, 0, hose->isa_mem_phys, 0,
hose->isa_mem_size, 0, j) == 0) hose->isa_mem_size, 0, j) == 0)
printk(KERN_INFO "%s: Legacy ISA memory support enabled\n", printk(KERN_INFO "%pOF: Legacy ISA memory support enabled\n",
hose->dn->full_name); hose->dn);
/* Configure IO, always 64K starting at 0. We hard wire it to 64K ! /* Configure IO, always 64K starting at 0. We hard wire it to 64K !
* Note also that it -has- to be region index 2 on this HW * Note also that it -has- to be region index 2 on this HW
@ -1970,8 +1962,8 @@ static void __init ppc4xx_pciex_port_setup_hose(struct ppc4xx_pciex_port *port)
(hose->first_busno + 1) * 0x100000, (hose->first_busno + 1) * 0x100000,
busses * 0x100000); busses * 0x100000);
if (cfg_data == NULL) { if (cfg_data == NULL) {
printk(KERN_ERR "%s: Can't map external config space !", printk(KERN_ERR "%pOF: Can't map external config space !",
port->node->full_name); port->node);
goto fail; goto fail;
} }
hose->cfg_data = cfg_data; hose->cfg_data = cfg_data;
@ -1982,13 +1974,13 @@ static void __init ppc4xx_pciex_port_setup_hose(struct ppc4xx_pciex_port *port)
*/ */
mbase = ioremap(port->cfg_space.start + 0x10000000, 0x1000); mbase = ioremap(port->cfg_space.start + 0x10000000, 0x1000);
if (mbase == NULL) { if (mbase == NULL) {
printk(KERN_ERR "%s: Can't map internal config space !", printk(KERN_ERR "%pOF: Can't map internal config space !",
port->node->full_name); port->node);
goto fail; goto fail;
} }
hose->cfg_addr = mbase; hose->cfg_addr = mbase;
pr_debug("PCIE %s, bus %d..%d\n", port->node->full_name, pr_debug("PCIE %pOF, bus %d..%d\n", port->node,
hose->first_busno, hose->last_busno); hose->first_busno, hose->last_busno);
pr_debug(" config space mapped at: root @0x%p, other @0x%p\n", pr_debug(" config space mapped at: root @0x%p, other @0x%p\n",
hose->cfg_addr, hose->cfg_data); hose->cfg_addr, hose->cfg_data);
@ -2100,14 +2092,13 @@ static void __init ppc4xx_probe_pciex_bridge(struct device_node *np)
/* Get the port number from the device-tree */ /* Get the port number from the device-tree */
pval = of_get_property(np, "port", NULL); pval = of_get_property(np, "port", NULL);
if (pval == NULL) { if (pval == NULL) {
printk(KERN_ERR "PCIE: Can't find port number for %s\n", printk(KERN_ERR "PCIE: Can't find port number for %pOF\n", np);
np->full_name);
return; return;
} }
portno = *pval; portno = *pval;
if (portno >= ppc4xx_pciex_port_count) { if (portno >= ppc4xx_pciex_port_count) {
printk(KERN_ERR "PCIE: port number out of range for %s\n", printk(KERN_ERR "PCIE: port number out of range for %pOF\n",
np->full_name); np);
return; return;
} }
port = &ppc4xx_pciex_ports[portno]; port = &ppc4xx_pciex_ports[portno];
@ -2125,8 +2116,8 @@ static void __init ppc4xx_probe_pciex_bridge(struct device_node *np)
if (ppc4xx_pciex_hwops->want_sdr) { if (ppc4xx_pciex_hwops->want_sdr) {
pval = of_get_property(np, "sdr-base", NULL); pval = of_get_property(np, "sdr-base", NULL);
if (pval == NULL) { if (pval == NULL) {
printk(KERN_ERR "PCIE: missing sdr-base for %s\n", printk(KERN_ERR "PCIE: missing sdr-base for %pOF\n",
np->full_name); np);
return; return;
} }
port->sdr_base = *pval; port->sdr_base = *pval;
@ -2142,29 +2133,26 @@ static void __init ppc4xx_probe_pciex_bridge(struct device_node *np)
} else if (!strcmp(val, "pci")) { } else if (!strcmp(val, "pci")) {
port->endpoint = 0; port->endpoint = 0;
} else { } else {
printk(KERN_ERR "PCIE: missing or incorrect device_type for %s\n", printk(KERN_ERR "PCIE: missing or incorrect device_type for %pOF\n",
np->full_name); np);
return; return;
} }
/* Fetch config space registers address */ /* Fetch config space registers address */
if (of_address_to_resource(np, 0, &port->cfg_space)) { if (of_address_to_resource(np, 0, &port->cfg_space)) {
printk(KERN_ERR "%s: Can't get PCI-E config space !", printk(KERN_ERR "%pOF: Can't get PCI-E config space !", np);
np->full_name);
return; return;
} }
/* Fetch host bridge internal registers address */ /* Fetch host bridge internal registers address */
if (of_address_to_resource(np, 1, &port->utl_regs)) { if (of_address_to_resource(np, 1, &port->utl_regs)) {
printk(KERN_ERR "%s: Can't get UTL register base !", printk(KERN_ERR "%pOF: Can't get UTL register base !", np);
np->full_name);
return; return;
} }
/* Map DCRs */ /* Map DCRs */
dcrs = dcr_resource_start(np, 0); dcrs = dcr_resource_start(np, 0);
if (dcrs == 0) { if (dcrs == 0) {
printk(KERN_ERR "%s: Can't get DCR register base !", printk(KERN_ERR "%pOF: Can't get DCR register base !", np);
np->full_name);
return; return;
} }
port->dcrs = dcr_map(np, dcrs, dcr_resource_len(np, 0)); port->dcrs = dcr_map(np, dcrs, dcr_resource_len(np, 0));

View File

@ -90,7 +90,7 @@ static int __init ppc4xx_l2c_probe(void)
/* Get l2 cache size */ /* Get l2 cache size */
prop = of_get_property(np, "cache-size", NULL); prop = of_get_property(np, "cache-size", NULL);
if (prop == NULL) { if (prop == NULL) {
printk(KERN_ERR "%s: Can't get cache-size!\n", np->full_name); printk(KERN_ERR "%pOF: Can't get cache-size!\n", np);
of_node_put(np); of_node_put(np);
return -ENODEV; return -ENODEV;
} }
@ -99,8 +99,7 @@ static int __init ppc4xx_l2c_probe(void)
/* Map DCRs */ /* Map DCRs */
dcrreg = of_get_property(np, "dcr-reg", &len); dcrreg = of_get_property(np, "dcr-reg", &len);
if (!dcrreg || (len != 4 * sizeof(u32))) { if (!dcrreg || (len != 4 * sizeof(u32))) {
printk(KERN_ERR "%s: Can't get DCR register base !", printk(KERN_ERR "%pOF: Can't get DCR register base !", np);
np->full_name);
of_node_put(np); of_node_put(np);
return -ENODEV; return -ENODEV;
} }

View File

@ -243,16 +243,16 @@ static struct uic * __init uic_init_one(struct device_node *node)
raw_spin_lock_init(&uic->lock); raw_spin_lock_init(&uic->lock);
indexp = of_get_property(node, "cell-index", &len); indexp = of_get_property(node, "cell-index", &len);
if (!indexp || (len != sizeof(u32))) { if (!indexp || (len != sizeof(u32))) {
printk(KERN_ERR "uic: Device node %s has missing or invalid " printk(KERN_ERR "uic: Device node %pOF has missing or invalid "
"cell-index property\n", node->full_name); "cell-index property\n", node);
return NULL; return NULL;
} }
uic->index = *indexp; uic->index = *indexp;
dcrreg = of_get_property(node, "dcr-reg", &len); dcrreg = of_get_property(node, "dcr-reg", &len);
if (!dcrreg || (len != 2*sizeof(u32))) { if (!dcrreg || (len != 2*sizeof(u32))) {
printk(KERN_ERR "uic: Device node %s has missing or invalid " printk(KERN_ERR "uic: Device node %pOF has missing or invalid "
"dcr-reg property\n", node->full_name); "dcr-reg property\n", node);
return NULL; return NULL;
} }
uic->dcrbase = *dcrreg; uic->dcrbase = *dcrreg;
@ -292,7 +292,7 @@ void __init uic_init_tree(void)
* top-level interrupt controller */ * top-level interrupt controller */
primary_uic = uic_init_one(np); primary_uic = uic_init_one(np);
if (!primary_uic) if (!primary_uic)
panic("Unable to initialize primary UIC %s\n", np->full_name); panic("Unable to initialize primary UIC %pOF\n", np);
irq_set_default_host(primary_uic->irqhost); irq_set_default_host(primary_uic->irqhost);
of_node_put(np); of_node_put(np);
@ -306,8 +306,8 @@ void __init uic_init_tree(void)
uic = uic_init_one(np); uic = uic_init_one(np);
if (! uic) if (! uic)
panic("Unable to initialize a secondary UIC %s\n", panic("Unable to initialize a secondary UIC %pOF\n",
np->full_name); np);
cascade_virq = irq_of_parse_and_map(np, 0); cascade_virq = irq_of_parse_and_map(np, 0);

View File

@ -387,8 +387,8 @@ static unsigned int __init get_fifo_size(struct device_node *np,
if (fp) if (fp)
return *fp; return *fp;
pr_warning("no %s property in %s node, defaulting to %d\n", pr_warning("no %s property in %pOF node, defaulting to %d\n",
prop_name, np->full_name, DEFAULT_FIFO_SIZE); prop_name, np, DEFAULT_FIFO_SIZE);
return DEFAULT_FIFO_SIZE; return DEFAULT_FIFO_SIZE;
} }
@ -426,15 +426,15 @@ static void __init mpc512x_psc_fifo_init(void)
psc = of_iomap(np, 0); psc = of_iomap(np, 0);
if (!psc) { if (!psc) {
pr_err("%s: Can't map %s device\n", pr_err("%s: Can't map %pOF device\n",
__func__, np->full_name); __func__, np);
continue; continue;
} }
/* FIFO space is 4KiB, check if requested size is available */ /* FIFO space is 4KiB, check if requested size is available */
if ((fifobase + tx_fifo_size + rx_fifo_size) > 0x1000) { if ((fifobase + tx_fifo_size + rx_fifo_size) > 0x1000) {
pr_err("%s: no fifo space available for %s\n", pr_err("%s: no fifo space available for %pOF\n",
__func__, np->full_name); __func__, np);
iounmap(psc); iounmap(psc);
/* /*
* chances are that another device requests less * chances are that another device requests less

View File

@ -99,7 +99,7 @@ static void __init efika_pcisetup(void)
bus_range = of_get_property(pcictrl, "bus-range", &len); bus_range = of_get_property(pcictrl, "bus-range", &len);
if (bus_range == NULL || len < 2 * sizeof(int)) { if (bus_range == NULL || len < 2 * sizeof(int)) {
printk(KERN_WARNING EFIKA_PLATFORM_NAME printk(KERN_WARNING EFIKA_PLATFORM_NAME
": Can't get bus-range for %s\n", pcictrl->full_name); ": Can't get bus-range for %pOF\n", pcictrl);
goto out_put; goto out_put;
} }
@ -109,14 +109,14 @@ static void __init efika_pcisetup(void)
else else
printk(KERN_INFO EFIKA_PLATFORM_NAME ": PCI buses %d..%d", printk(KERN_INFO EFIKA_PLATFORM_NAME ": PCI buses %d..%d",
bus_range[0], bus_range[1]); bus_range[0], bus_range[1]);
printk(" controlled by %s\n", pcictrl->full_name); printk(" controlled by %pOF\n", pcictrl);
printk("\n"); printk("\n");
hose = pcibios_alloc_controller(pcictrl); hose = pcibios_alloc_controller(pcictrl);
if (!hose) { if (!hose) {
printk(KERN_WARNING EFIKA_PLATFORM_NAME printk(KERN_WARNING EFIKA_PLATFORM_NAME
": Can't allocate PCI controller structure for %s\n", ": Can't allocate PCI controller structure for %pOF\n",
pcictrl->full_name); pcictrl);
goto out_put; goto out_put;
} }

View File

@ -156,7 +156,7 @@ static void __init media5200_init_irq(void)
fpga_np = of_find_compatible_node(NULL, NULL, "fsl,media5200-fpga"); fpga_np = of_find_compatible_node(NULL, NULL, "fsl,media5200-fpga");
if (!fpga_np) if (!fpga_np)
goto out; goto out;
pr_debug("%s: found fpga node: %s\n", __func__, fpga_np->full_name); pr_debug("%s: found fpga node: %pOF\n", __func__, fpga_np);
media5200_irq.regs = of_iomap(fpga_np, 0); media5200_irq.regs = of_iomap(fpga_np, 0);
if (!media5200_irq.regs) if (!media5200_irq.regs)

View File

@ -226,7 +226,7 @@ static int mpc52xx_gpt_irq_xlate(struct irq_domain *h, struct device_node *ct,
dev_dbg(gpt->dev, "%s: flags=%i\n", __func__, intspec[0]); dev_dbg(gpt->dev, "%s: flags=%i\n", __func__, intspec[0]);
if ((intsize < 1) || (intspec[0] > 3)) { if ((intsize < 1) || (intspec[0] > 3)) {
dev_err(gpt->dev, "bad irq specifier in %s\n", ct->full_name); dev_err(gpt->dev, "bad irq specifier in %pOF\n", ct);
return -EINVAL; return -EINVAL;
} }
@ -331,7 +331,7 @@ mpc52xx_gpt_gpio_setup(struct mpc52xx_gpt_priv *gpt, struct device_node *node)
if (!of_find_property(node, "gpio-controller", NULL)) if (!of_find_property(node, "gpio-controller", NULL))
return; return;
gpt->gc.label = kstrdup(node->full_name, GFP_KERNEL); gpt->gc.label = kasprintf(GFP_KERNEL, "%pOF", node);
if (!gpt->gc.label) { if (!gpt->gc.label) {
dev_err(gpt->dev, "out of memory\n"); dev_err(gpt->dev, "out of memory\n");
return; return;

View File

@ -369,19 +369,19 @@ mpc52xx_add_bridge(struct device_node *node)
const int *bus_range; const int *bus_range;
struct resource rsrc; struct resource rsrc;
pr_debug("Adding MPC52xx PCI host bridge %s\n", node->full_name); pr_debug("Adding MPC52xx PCI host bridge %pOF\n", node);
pci_add_flags(PCI_REASSIGN_ALL_BUS); pci_add_flags(PCI_REASSIGN_ALL_BUS);
if (of_address_to_resource(node, 0, &rsrc) != 0) { if (of_address_to_resource(node, 0, &rsrc) != 0) {
printk(KERN_ERR "Can't get %s resources\n", node->full_name); printk(KERN_ERR "Can't get %pOF resources\n", node);
return -EINVAL; return -EINVAL;
} }
bus_range = of_get_property(node, "bus-range", &len); bus_range = of_get_property(node, "bus-range", &len);
if (bus_range == NULL || len < 2 * sizeof(int)) { if (bus_range == NULL || len < 2 * sizeof(int)) {
printk(KERN_WARNING "Can't get %s bus-range, assume bus 0\n", printk(KERN_WARNING "Can't get %pOF bus-range, assume bus 0\n",
node->full_name); node);
bus_range = NULL; bus_range = NULL;
} }

View File

@ -128,7 +128,7 @@ static int mcu_gpiochip_add(struct mcu *mcu)
return -ENODEV; return -ENODEV;
gc->owner = THIS_MODULE; gc->owner = THIS_MODULE;
gc->label = np->full_name; gc->label = kasprintf(GFP_KERNEL, "%pOF", np);
gc->can_sleep = 1; gc->can_sleep = 1;
gc->ngpio = MCU_NUM_GPIO; gc->ngpio = MCU_NUM_GPIO;
gc->base = -1; gc->base = -1;
@ -141,6 +141,7 @@ static int mcu_gpiochip_add(struct mcu *mcu)
static int mcu_gpiochip_remove(struct mcu *mcu) static int mcu_gpiochip_remove(struct mcu *mcu)
{ {
kfree(mcu->gc.label);
gpiochip_remove(&mcu->gc); gpiochip_remove(&mcu->gc);
return 0; return 0;
} }

View File

@ -113,7 +113,7 @@ static int __init of_fsl_spi_probe(char *type, char *compatible, u32 sysclk,
unreg: unreg:
platform_device_del(pdev); platform_device_del(pdev);
err: err:
pr_err("%s: registration failed\n", np->full_name); pr_err("%pOF: registration failed\n", np);
next: next:
i++; i++;
} }

View File

@ -508,8 +508,8 @@ static void __init p1022_ds_setup_arch(void)
* allocate one static local variable for each * allocate one static local variable for each
* call to this function. * call to this function.
*/ */
pr_info("p1022ds: disabling %s node", pr_info("p1022ds: disabling %pOF node",
np2->full_name); np2);
of_update_property(np2, &nor_status); of_update_property(np2, &nor_status);
of_node_put(np2); of_node_put(np2);
} }
@ -524,8 +524,8 @@ static void __init p1022_ds_setup_arch(void)
.length = sizeof("disabled"), .length = sizeof("disabled"),
}; };
pr_info("p1022ds: disabling %s node", pr_info("p1022ds: disabling %pOF node",
np2->full_name); np2);
of_update_property(np2, &nand_status); of_update_property(np2, &nand_status);
of_node_put(np2); of_node_put(np2);
} }

View File

@ -100,8 +100,8 @@ static void xes_mpc85xx_fixups(void)
err = of_address_to_resource(np, 0, &r[0]); err = of_address_to_resource(np, 0, &r[0]);
if (err) { if (err) {
printk(KERN_WARNING "xes_mpc85xx: Could not get " printk(KERN_WARNING "xes_mpc85xx: Could not get "
"resource for device tree node '%s'", "resource for device tree node '%pOF'",
np->full_name); np);
continue; continue;
} }

View File

@ -40,7 +40,7 @@ static int __init amigaone_add_bridge(struct device_node *dev)
const int *bus_range; const int *bus_range;
struct pci_controller *hose; struct pci_controller *hose;
printk(KERN_INFO "Adding PCI host bridge %s\n", dev->full_name); printk(KERN_INFO "Adding PCI host bridge %pOF\n", dev);
cfg_addr = of_get_address(dev, 0, NULL, NULL); cfg_addr = of_get_address(dev, 0, NULL, NULL);
cfg_data = of_get_address(dev, 1, NULL, NULL); cfg_data = of_get_address(dev, 1, NULL, NULL);
@ -49,8 +49,8 @@ static int __init amigaone_add_bridge(struct device_node *dev)
bus_range = of_get_property(dev, "bus-range", &len); bus_range = of_get_property(dev, "bus-range", &len);
if ((bus_range == NULL) || (len < 2 * sizeof(int))) if ((bus_range == NULL) || (len < 2 * sizeof(int)))
printk(KERN_WARNING "Can't get bus-range for %s, assume" printk(KERN_WARNING "Can't get bus-range for %pOF, assume"
" bus 0\n", dev->full_name); " bus 0\n", dev);
hose = pcibios_alloc_controller(dev); hose = pcibios_alloc_controller(dev);
if (hose == NULL) if (hose == NULL)

View File

@ -187,8 +187,8 @@ static struct axon_msic *find_msi_translator(struct pci_dev *dev)
irq_domain = irq_find_host(dn); irq_domain = irq_find_host(dn);
if (!irq_domain) { if (!irq_domain) {
dev_dbg(&dev->dev, "axon_msi: no irq_domain found for node %s\n", dev_dbg(&dev->dev, "axon_msi: no irq_domain found for node %pOF\n",
dn->full_name); dn);
goto out_error; goto out_error;
} }
@ -326,8 +326,8 @@ static void axon_msi_shutdown(struct platform_device *device)
struct axon_msic *msic = dev_get_drvdata(&device->dev); struct axon_msic *msic = dev_get_drvdata(&device->dev);
u32 tmp; u32 tmp;
pr_devel("axon_msi: disabling %s\n", pr_devel("axon_msi: disabling %pOF\n",
irq_domain_get_of_node(msic->irq_domain)->full_name); irq_domain_get_of_node(msic->irq_domain));
tmp = dcr_read(msic->dcr_host, MSIC_CTRL_REG); tmp = dcr_read(msic->dcr_host, MSIC_CTRL_REG);
tmp &= ~MSIC_CTRL_ENABLE & ~MSIC_CTRL_IRQ_ENABLE; tmp &= ~MSIC_CTRL_ENABLE & ~MSIC_CTRL_IRQ_ENABLE;
msic_dcr_write(msic, MSIC_CTRL_REG, tmp); msic_dcr_write(msic, MSIC_CTRL_REG, tmp);
@ -340,12 +340,12 @@ static int axon_msi_probe(struct platform_device *device)
unsigned int virq; unsigned int virq;
int dcr_base, dcr_len; int dcr_base, dcr_len;
pr_devel("axon_msi: setting up dn %s\n", dn->full_name); pr_devel("axon_msi: setting up dn %pOF\n", dn);
msic = kzalloc(sizeof(struct axon_msic), GFP_KERNEL); msic = kzalloc(sizeof(struct axon_msic), GFP_KERNEL);
if (!msic) { if (!msic) {
printk(KERN_ERR "axon_msi: couldn't allocate msic for %s\n", printk(KERN_ERR "axon_msi: couldn't allocate msic for %pOF\n",
dn->full_name); dn);
goto out; goto out;
} }
@ -354,30 +354,30 @@ static int axon_msi_probe(struct platform_device *device)
if (dcr_base == 0 || dcr_len == 0) { if (dcr_base == 0 || dcr_len == 0) {
printk(KERN_ERR printk(KERN_ERR
"axon_msi: couldn't parse dcr properties on %s\n", "axon_msi: couldn't parse dcr properties on %pOF\n",
dn->full_name); dn);
goto out_free_msic; goto out_free_msic;
} }
msic->dcr_host = dcr_map(dn, dcr_base, dcr_len); msic->dcr_host = dcr_map(dn, dcr_base, dcr_len);
if (!DCR_MAP_OK(msic->dcr_host)) { if (!DCR_MAP_OK(msic->dcr_host)) {
printk(KERN_ERR "axon_msi: dcr_map failed for %s\n", printk(KERN_ERR "axon_msi: dcr_map failed for %pOF\n",
dn->full_name); dn);
goto out_free_msic; goto out_free_msic;
} }
msic->fifo_virt = dma_alloc_coherent(&device->dev, MSIC_FIFO_SIZE_BYTES, msic->fifo_virt = dma_alloc_coherent(&device->dev, MSIC_FIFO_SIZE_BYTES,
&msic->fifo_phys, GFP_KERNEL); &msic->fifo_phys, GFP_KERNEL);
if (!msic->fifo_virt) { if (!msic->fifo_virt) {
printk(KERN_ERR "axon_msi: couldn't allocate fifo for %s\n", printk(KERN_ERR "axon_msi: couldn't allocate fifo for %pOF\n",
dn->full_name); dn);
goto out_free_msic; goto out_free_msic;
} }
virq = irq_of_parse_and_map(dn, 0); virq = irq_of_parse_and_map(dn, 0);
if (!virq) { if (!virq) {
printk(KERN_ERR "axon_msi: irq parse and map failed for %s\n", printk(KERN_ERR "axon_msi: irq parse and map failed for %pOF\n",
dn->full_name); dn);
goto out_free_fifo; goto out_free_fifo;
} }
memset(msic->fifo_virt, 0xff, MSIC_FIFO_SIZE_BYTES); memset(msic->fifo_virt, 0xff, MSIC_FIFO_SIZE_BYTES);
@ -385,8 +385,8 @@ static int axon_msi_probe(struct platform_device *device)
/* We rely on being able to stash a virq in a u16, so limit irqs to < 65536 */ /* We rely on being able to stash a virq in a u16, so limit irqs to < 65536 */
msic->irq_domain = irq_domain_add_nomap(dn, 65536, &msic_host_ops, msic); msic->irq_domain = irq_domain_add_nomap(dn, 65536, &msic_host_ops, msic);
if (!msic->irq_domain) { if (!msic->irq_domain) {
printk(KERN_ERR "axon_msi: couldn't allocate irq_domain for %s\n", printk(KERN_ERR "axon_msi: couldn't allocate irq_domain for %pOF\n",
dn->full_name); dn);
goto out_free_fifo; goto out_free_fifo;
} }
@ -412,7 +412,7 @@ static int axon_msi_probe(struct platform_device *device)
axon_msi_debug_setup(dn, msic); axon_msi_debug_setup(dn, msic);
printk(KERN_DEBUG "axon_msi: setup MSIC on %s\n", dn->full_name); printk(KERN_DEBUG "axon_msi: setup MSIC on %pOF\n", dn);
return 0; return 0;

View File

@ -303,8 +303,8 @@ static void __init init_one_iic(unsigned int hw_cpu, unsigned long addr,
iic->node = of_node_get(node); iic->node = of_node_get(node);
out_be64(&iic->regs->prio, 0); out_be64(&iic->regs->prio, 0);
printk(KERN_INFO "IIC for CPU %d target id 0x%x : %s\n", printk(KERN_INFO "IIC for CPU %d target id 0x%x : %pOF\n",
hw_cpu, iic->target_id, node->full_name); hw_cpu, iic->target_id, node);
} }
static int __init setup_iic(void) static int __init setup_iic(void)

View File

@ -278,8 +278,8 @@ static int cell_iommu_find_ioc(int nid, unsigned long *base)
if (of_node_to_nid(np) != nid) if (of_node_to_nid(np) != nid)
continue; continue;
if (of_address_to_resource(np, 0, &r)) { if (of_address_to_resource(np, 0, &r)) {
printk(KERN_ERR "iommu: can't get address for %s\n", printk(KERN_ERR "iommu: can't get address for %pOF\n",
np->full_name); np);
continue; continue;
} }
*base = r.start; *base = r.start;
@ -458,8 +458,8 @@ static inline u32 cell_iommu_get_ioid(struct device_node *np)
ioid = of_get_property(np, "ioid", NULL); ioid = of_get_property(np, "ioid", NULL);
if (ioid == NULL) { if (ioid == NULL) {
printk(KERN_WARNING "iommu: missing ioid for %s using 0\n", printk(KERN_WARNING "iommu: missing ioid for %pOF using 0\n",
np->full_name); np);
return 0; return 0;
} }
@ -559,8 +559,8 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev)
*/ */
iommu = cell_iommu_for_node(dev_to_node(dev)); iommu = cell_iommu_for_node(dev_to_node(dev));
if (iommu == NULL || list_empty(&iommu->windows)) { if (iommu == NULL || list_empty(&iommu->windows)) {
dev_err(dev, "iommu: missing iommu for %s (node %d)\n", dev_err(dev, "iommu: missing iommu for %pOF (node %d)\n",
of_node_full_name(dev->of_node), dev_to_node(dev)); dev->of_node, dev_to_node(dev));
return NULL; return NULL;
} }
window = list_entry(iommu->windows.next, struct iommu_window, list); window = list_entry(iommu->windows.next, struct iommu_window, list);
@ -720,12 +720,12 @@ static struct cbe_iommu * __init cell_iommu_alloc(struct device_node *np)
/* Get node ID */ /* Get node ID */
nid = of_node_to_nid(np); nid = of_node_to_nid(np);
if (nid < 0) { if (nid < 0) {
printk(KERN_ERR "iommu: failed to get node for %s\n", printk(KERN_ERR "iommu: failed to get node for %pOF\n",
np->full_name); np);
return NULL; return NULL;
} }
pr_debug("iommu: setting up iommu for node %d (%s)\n", pr_debug("iommu: setting up iommu for node %d (%pOF)\n",
nid, np->full_name); nid, np);
/* XXX todo: If we can have multiple windows on the same IOMMU, which /* XXX todo: If we can have multiple windows on the same IOMMU, which
* isn't the case today, we probably want here to check whether the * isn't the case today, we probably want here to check whether the
@ -736,8 +736,8 @@ static struct cbe_iommu * __init cell_iommu_alloc(struct device_node *np)
*/ */
if (cbe_nr_iommus >= NR_IOMMUS) { if (cbe_nr_iommus >= NR_IOMMUS) {
printk(KERN_ERR "iommu: too many IOMMUs detected ! (%s)\n", printk(KERN_ERR "iommu: too many IOMMUs detected ! (%pOF)\n",
np->full_name); np);
return NULL; return NULL;
} }

View File

@ -196,8 +196,8 @@ static int __init cbe_ptcal_enable(void)
for_each_node_by_type(np, "cpu") { for_each_node_by_type(np, "cpu") {
const u32 *nid = of_get_property(np, "node-id", NULL); const u32 *nid = of_get_property(np, "node-id", NULL);
if (!nid) { if (!nid) {
printk(KERN_ERR "%s: node %s is missing node-id?\n", printk(KERN_ERR "%s: node %pOF is missing node-id?\n",
__func__, np->full_name); __func__, np);
continue; continue;
} }
cbe_ptcal_enable_on_node(*nid, order); cbe_ptcal_enable_on_node(*nid, order);

View File

@ -130,8 +130,8 @@ int __init spiderpci_iowa_init(struct iowa_bus *bus, void *data)
struct resource r; struct resource r;
unsigned long offset = (unsigned long)data; unsigned long offset = (unsigned long)data;
pr_debug("SPIDERPCI-IOWA:Bus initialize for spider(%s)\n", pr_debug("SPIDERPCI-IOWA:Bus initialize for spider(%pOF)\n",
np->full_name); np);
priv = kzalloc(sizeof(struct spiderpci_iowa_private), GFP_KERNEL); priv = kzalloc(sizeof(struct spiderpci_iowa_private), GFP_KERNEL);
if (!priv) { if (!priv) {

View File

@ -323,8 +323,8 @@ static void __init spider_init_one(struct device_node *of_node, int chip,
irq_set_handler_data(virq, pic); irq_set_handler_data(virq, pic);
irq_set_chained_handler(virq, spider_irq_cascade); irq_set_chained_handler(virq, spider_irq_cascade);
printk(KERN_INFO "spider_pic: node %d, addr: 0x%lx %s\n", printk(KERN_INFO "spider_pic: node %d, addr: 0x%lx %pOF\n",
pic->node_id, addr, of_node->full_name); pic->node_id, addr, of_node);
/* Enable the interrupt detection enable bit. Do this last! */ /* Enable the interrupt detection enable bit. Do this last! */
out_be32(pic->regs + TIR_DEN, in_be32(pic->regs + TIR_DEN) | 0x1); out_be32(pic->regs + TIR_DEN, in_be32(pic->regs + TIR_DEN) | 0x1);

View File

@ -191,8 +191,8 @@ static int __init spu_map_interrupts(struct spu *spu, struct device_node *np)
goto err; goto err;
} }
ret = -EINVAL; ret = -EINVAL;
pr_debug(" irq %d no 0x%x on %s\n", i, oirq.args[0], pr_debug(" irq %d no 0x%x on %pOF\n", i, oirq.args[0],
oirq.np->full_name); oirq.np);
spu->irqs[i] = irq_create_of_mapping(&oirq); spu->irqs[i] = irq_create_of_mapping(&oirq);
if (!spu->irqs[i]) { if (!spu->irqs[i]) {
pr_debug("spu_new: failed to map it !\n"); pr_debug("spu_new: failed to map it !\n");
@ -243,32 +243,32 @@ static int __init spu_map_device(struct spu *spu)
ret = spu_map_resource(spu, 0, (void __iomem**)&spu->local_store, ret = spu_map_resource(spu, 0, (void __iomem**)&spu->local_store,
&spu->local_store_phys); &spu->local_store_phys);
if (ret) { if (ret) {
pr_debug("spu_new: failed to map %s resource 0\n", pr_debug("spu_new: failed to map %pOF resource 0\n",
np->full_name); np);
goto out; goto out;
} }
ret = spu_map_resource(spu, 1, (void __iomem**)&spu->problem, ret = spu_map_resource(spu, 1, (void __iomem**)&spu->problem,
&spu->problem_phys); &spu->problem_phys);
if (ret) { if (ret) {
pr_debug("spu_new: failed to map %s resource 1\n", pr_debug("spu_new: failed to map %pOF resource 1\n",
np->full_name); np);
goto out_unmap; goto out_unmap;
} }
ret = spu_map_resource(spu, 2, (void __iomem**)&spu->priv2, NULL); ret = spu_map_resource(spu, 2, (void __iomem**)&spu->priv2, NULL);
if (ret) { if (ret) {
pr_debug("spu_new: failed to map %s resource 2\n", pr_debug("spu_new: failed to map %pOF resource 2\n",
np->full_name); np);
goto out_unmap; goto out_unmap;
} }
if (!firmware_has_feature(FW_FEATURE_LPAR)) if (!firmware_has_feature(FW_FEATURE_LPAR))
ret = spu_map_resource(spu, 3, ret = spu_map_resource(spu, 3,
(void __iomem**)&spu->priv1, NULL); (void __iomem**)&spu->priv1, NULL);
if (ret) { if (ret) {
pr_debug("spu_new: failed to map %s resource 3\n", pr_debug("spu_new: failed to map %pOF resource 3\n",
np->full_name); np);
goto out_unmap; goto out_unmap;
} }
pr_debug("spu_new: %s maps:\n", np->full_name); pr_debug("spu_new: %pOF maps:\n", np);
pr_debug(" local store : 0x%016lx -> 0x%p\n", pr_debug(" local store : 0x%016lx -> 0x%p\n",
spu->local_store_phys, spu->local_store); spu->local_store_phys, spu->local_store);
pr_debug(" problem state : 0x%016lx -> 0x%p\n", pr_debug(" problem state : 0x%016lx -> 0x%p\n",
@ -316,8 +316,8 @@ static int __init of_create_spu(struct spu *spu, void *data)
spu->node = of_node_to_nid(spe); spu->node = of_node_to_nid(spe);
if (spu->node >= MAX_NUMNODES) { if (spu->node >= MAX_NUMNODES) {
printk(KERN_WARNING "SPE %s on node %d ignored," printk(KERN_WARNING "SPE %pOF on node %d ignored,"
" node number too big\n", spe->full_name, spu->node); " node number too big\n", spe, spu->node);
printk(KERN_WARNING "Check if CONFIG_NUMA is enabled.\n"); printk(KERN_WARNING "Check if CONFIG_NUMA is enabled.\n");
ret = -ENODEV; ret = -ENODEV;
goto out; goto out;

View File

@ -235,14 +235,14 @@ chrp_find_bridges(void)
++index; ++index;
/* The GG2 bridge on the LongTrail doesn't have an address */ /* The GG2 bridge on the LongTrail doesn't have an address */
if (of_address_to_resource(dev, 0, &r) && !is_longtrail) { if (of_address_to_resource(dev, 0, &r) && !is_longtrail) {
printk(KERN_WARNING "Can't use %s: no address\n", printk(KERN_WARNING "Can't use %pOF: no address\n",
dev->full_name); dev);
continue; continue;
} }
bus_range = of_get_property(dev, "bus-range", &len); bus_range = of_get_property(dev, "bus-range", &len);
if (bus_range == NULL || len < 2 * sizeof(int)) { if (bus_range == NULL || len < 2 * sizeof(int)) {
printk(KERN_WARNING "Can't get bus-range for %s\n", printk(KERN_WARNING "Can't get bus-range for %pOF\n",
dev->full_name); dev);
continue; continue;
} }
if (bus_range[1] == bus_range[0]) if (bus_range[1] == bus_range[0])
@ -250,15 +250,15 @@ chrp_find_bridges(void)
else else
printk(KERN_INFO "PCI buses %d..%d", printk(KERN_INFO "PCI buses %d..%d",
bus_range[0], bus_range[1]); bus_range[0], bus_range[1]);
printk(" controlled by %s", dev->full_name); printk(" controlled by %pOF", dev);
if (!is_longtrail) if (!is_longtrail)
printk(" at %llx", (unsigned long long)r.start); printk(" at %llx", (unsigned long long)r.start);
printk("\n"); printk("\n");
hose = pcibios_alloc_controller(dev); hose = pcibios_alloc_controller(dev);
if (!hose) { if (!hose) {
printk("Can't allocate PCI controller structure for %s\n", printk("Can't allocate PCI controller structure for %pOF\n",
dev->full_name); dev);
continue; continue;
} }
hose->first_busno = hose->self_busno = bus_range[0]; hose->first_busno = hose->self_busno = bus_range[0];
@ -297,8 +297,8 @@ chrp_find_bridges(void)
} }
} }
} else { } else {
printk("No methods for %s (model %s), using RTAS\n", printk("No methods for %pOF (model %s), using RTAS\n",
dev->full_name, model); dev, model);
hose->ops = &rtas_pci_ops; hose->ops = &rtas_pci_ops;
} }

View File

@ -41,12 +41,12 @@ static int __init linkstation_add_bridge(struct device_node *dev)
struct pci_controller *hose; struct pci_controller *hose;
const int *bus_range; const int *bus_range;
printk("Adding PCI host bridge %s\n", dev->full_name); printk("Adding PCI host bridge %pOF\n", dev);
bus_range = of_get_property(dev, "bus-range", &len); bus_range = of_get_property(dev, "bus-range", &len);
if (bus_range == NULL || len < 2 * sizeof(int)) if (bus_range == NULL || len < 2 * sizeof(int))
printk(KERN_WARNING "Can't get bus-range for %s, assume" printk(KERN_WARNING "Can't get bus-range for %pOF, assume"
" bus 0\n", dev->full_name); " bus 0\n", dev);
hose = pcibios_alloc_controller(dev); hose = pcibios_alloc_controller(dev);
if (hose == NULL) if (hose == NULL)

View File

@ -115,7 +115,7 @@ static int __init mvme5100_add_bridge(struct device_node *dev)
struct pci_controller *hose; struct pci_controller *hose;
unsigned short devid; unsigned short devid;
pr_info("Adding PCI host bridge %s\n", dev->full_name); pr_info("Adding PCI host bridge %pOF\n", dev);
bus_range = of_get_property(dev, "bus-range", &len); bus_range = of_get_property(dev, "bus-range", &len);

View File

@ -44,7 +44,7 @@ static int __init storcenter_add_bridge(struct device_node *dev)
struct pci_controller *hose; struct pci_controller *hose;
const int *bus_range; const int *bus_range;
printk("Adding PCI host bridge %s\n", dev->full_name); printk("Adding PCI host bridge %pOF\n", dev);
hose = pcibios_alloc_controller(dev); hose = pcibios_alloc_controller(dev);
if (hose == NULL) if (hose == NULL)

View File

@ -73,8 +73,8 @@ static void __init fixup_bus_range(struct device_node *bridge)
/* Lookup the "bus-range" property for the hose */ /* Lookup the "bus-range" property for the hose */
prop = of_find_property(bridge, "bus-range", &len); prop = of_find_property(bridge, "bus-range", &len);
if (prop == NULL || prop->value == NULL || len < 2 * sizeof(int)) { if (prop == NULL || prop->value == NULL || len < 2 * sizeof(int)) {
printk(KERN_WARNING "Can't get bus-range for %s\n", printk(KERN_WARNING "Can't get bus-range for %pOF\n",
bridge->full_name); bridge);
return; return;
} }
bus_range = prop->value; bus_range = prop->value;
@ -498,12 +498,12 @@ static int __init maple_add_bridge(struct device_node *dev)
const int *bus_range; const int *bus_range;
int primary = 1; int primary = 1;
DBG("Adding PCI host bridge %s\n", dev->full_name); DBG("Adding PCI host bridge %pOF\n", dev);
bus_range = of_get_property(dev, "bus-range", &len); bus_range = of_get_property(dev, "bus-range", &len);
if (bus_range == NULL || len < 2 * sizeof(int)) { if (bus_range == NULL || len < 2 * sizeof(int)) {
printk(KERN_WARNING "Can't get bus-range for %s, assume bus 0\n", printk(KERN_WARNING "Can't get bus-range for %pOF, assume bus 0\n",
dev->full_name); dev);
} }
hose = pcibios_alloc_controller(dev); hose = pcibios_alloc_controller(dev);

View File

@ -193,7 +193,7 @@ static int __init pas_add_bridge(struct device_node *dev)
{ {
struct pci_controller *hose; struct pci_controller *hose;
pr_debug("Adding PCI host bridge %s\n", dev->full_name); pr_debug("Adding PCI host bridge %pOF\n", dev);
hose = pcibios_alloc_controller(dev); hose = pcibios_alloc_controller(dev);
if (!hose) if (!hose)

View File

@ -2658,25 +2658,25 @@ static void __init probe_one_macio(const char *name, const char *compat, int typ
if (i >= MAX_MACIO_CHIPS) { if (i >= MAX_MACIO_CHIPS) {
printk(KERN_ERR "pmac_feature: Please increase MAX_MACIO_CHIPS !\n"); printk(KERN_ERR "pmac_feature: Please increase MAX_MACIO_CHIPS !\n");
printk(KERN_ERR "pmac_feature: %s skipped\n", node->full_name); printk(KERN_ERR "pmac_feature: %pOF skipped\n", node);
return; return;
} }
addrp = of_get_pci_address(node, 0, &size, NULL); addrp = of_get_pci_address(node, 0, &size, NULL);
if (addrp == NULL) { if (addrp == NULL) {
printk(KERN_ERR "pmac_feature: %s: can't find base !\n", printk(KERN_ERR "pmac_feature: %pOF: can't find base !\n",
node->full_name); node);
return; return;
} }
addr = of_translate_address(node, addrp); addr = of_translate_address(node, addrp);
if (addr == 0) { if (addr == 0) {
printk(KERN_ERR "pmac_feature: %s, can't translate base !\n", printk(KERN_ERR "pmac_feature: %pOF, can't translate base !\n",
node->full_name); node);
return; return;
} }
base = ioremap(addr, (unsigned long)size); base = ioremap(addr, (unsigned long)size);
if (!base) { if (!base) {
printk(KERN_ERR "pmac_feature: %s, can't map mac-io chip !\n", printk(KERN_ERR "pmac_feature: %pOF, can't map mac-io chip !\n",
node->full_name); node);
return; return;
} }
if (type == macio_keylargo || type == macio_keylargo2) { if (type == macio_keylargo || type == macio_keylargo2) {

View File

@ -494,8 +494,8 @@ static struct pmac_i2c_host_kw *__init kw_i2c_host_init(struct device_node *np)
host = kzalloc(sizeof(struct pmac_i2c_host_kw), GFP_KERNEL); host = kzalloc(sizeof(struct pmac_i2c_host_kw), GFP_KERNEL);
if (host == NULL) { if (host == NULL) {
printk(KERN_ERR "low_i2c: Can't allocate host for %s\n", printk(KERN_ERR "low_i2c: Can't allocate host for %pOF\n",
np->full_name); np);
return NULL; return NULL;
} }
@ -505,8 +505,8 @@ static struct pmac_i2c_host_kw *__init kw_i2c_host_init(struct device_node *np)
*/ */
addrp = of_get_property(np, "AAPL,address", NULL); addrp = of_get_property(np, "AAPL,address", NULL);
if (addrp == NULL) { if (addrp == NULL) {
printk(KERN_ERR "low_i2c: Can't find address for %s\n", printk(KERN_ERR "low_i2c: Can't find address for %pOF\n",
np->full_name); np);
kfree(host); kfree(host);
return NULL; return NULL;
} }
@ -538,13 +538,13 @@ static struct pmac_i2c_host_kw *__init kw_i2c_host_init(struct device_node *np)
host->irq = irq_of_parse_and_map(np, 0); host->irq = irq_of_parse_and_map(np, 0);
if (!host->irq) if (!host->irq)
printk(KERN_WARNING printk(KERN_WARNING
"low_i2c: Failed to map interrupt for %s\n", "low_i2c: Failed to map interrupt for %pOF\n",
np->full_name); np);
host->base = ioremap((*addrp), 0x1000); host->base = ioremap((*addrp), 0x1000);
if (host->base == NULL) { if (host->base == NULL) {
printk(KERN_ERR "low_i2c: Can't map registers for %s\n", printk(KERN_ERR "low_i2c: Can't map registers for %pOF\n",
np->full_name); np);
kfree(host); kfree(host);
return NULL; return NULL;
} }
@ -560,8 +560,8 @@ static struct pmac_i2c_host_kw *__init kw_i2c_host_init(struct device_node *np)
"keywest i2c", host)) "keywest i2c", host))
host->irq = 0; host->irq = 0;
printk(KERN_INFO "KeyWest i2c @0x%08x irq %d %s\n", printk(KERN_INFO "KeyWest i2c @0x%08x irq %d %pOF\n",
*addrp, host->irq, np->full_name); *addrp, host->irq, np);
return host; return host;
} }
@ -798,7 +798,7 @@ static void __init pmu_i2c_probe(void)
if (busnode == NULL) if (busnode == NULL)
return; return;
printk(KERN_INFO "PMU i2c %s\n", busnode->full_name); printk(KERN_INFO "PMU i2c %pOF\n", busnode);
/* /*
* We add bus 1 and 2 only for now, bus 0 is "special" * We add bus 1 and 2 only for now, bus 0 is "special"
@ -913,7 +913,7 @@ static void __init smu_i2c_probe(void)
if (controller == NULL) if (controller == NULL)
return; return;
printk(KERN_INFO "SMU i2c %s\n", controller->full_name); printk(KERN_INFO "SMU i2c %pOF\n", controller);
/* Look for childs, note that they might not be of the right /* Look for childs, note that they might not be of the right
* type as older device trees mix i2c busses and other things * type as older device trees mix i2c busses and other things
@ -945,8 +945,8 @@ static void __init smu_i2c_probe(void)
bus->flags = 0; bus->flags = 0;
list_add(&bus->link, &pmac_i2c_busses); list_add(&bus->link, &pmac_i2c_busses);
printk(KERN_INFO " channel %x bus %s\n", printk(KERN_INFO " channel %x bus %pOF\n",
bus->channel, busnode->full_name); bus->channel, busnode);
} }
} }
@ -1129,7 +1129,7 @@ int pmac_i2c_setmode(struct pmac_i2c_bus *bus, int mode)
*/ */
if (mode < pmac_i2c_mode_dumb || mode > pmac_i2c_mode_combined) { if (mode < pmac_i2c_mode_dumb || mode > pmac_i2c_mode_combined) {
printk(KERN_ERR "low_i2c: Invalid mode %d requested on" printk(KERN_ERR "low_i2c: Invalid mode %d requested on"
" bus %s !\n", mode, bus->busnode->full_name); " bus %pOF !\n", mode, bus->busnode);
return -EINVAL; return -EINVAL;
} }
bus->mode = mode; bus->mode = mode;
@ -1146,8 +1146,8 @@ int pmac_i2c_xfer(struct pmac_i2c_bus *bus, u8 addrdir, int subsize,
WARN_ON(!bus->opened); WARN_ON(!bus->opened);
DBG("xfer() chan=%d, addrdir=0x%x, mode=%d, subsize=%d, subaddr=0x%x," DBG("xfer() chan=%d, addrdir=0x%x, mode=%d, subsize=%d, subaddr=0x%x,"
" %d bytes, bus %s\n", bus->channel, addrdir, bus->mode, subsize, " %d bytes, bus %pOF\n", bus->channel, addrdir, bus->mode, subsize,
subaddr, len, bus->busnode->full_name); subaddr, len, bus->busnode);
rc = bus->xfer(bus, addrdir, subsize, subaddr, data, len); rc = bus->xfer(bus, addrdir, subsize, subaddr, data, len);
@ -1241,13 +1241,13 @@ static void* pmac_i2c_do_begin(struct pmf_function *func, struct pmf_args *args)
bus = pmac_i2c_find_bus(func->node); bus = pmac_i2c_find_bus(func->node);
if (bus == NULL) { if (bus == NULL) {
printk(KERN_ERR "low_i2c: Can't find bus for %s (pfunc)\n", printk(KERN_ERR "low_i2c: Can't find bus for %pOF (pfunc)\n",
func->node->full_name); func->node);
return NULL; return NULL;
} }
if (pmac_i2c_open(bus, 0)) { if (pmac_i2c_open(bus, 0)) {
printk(KERN_ERR "low_i2c: Can't open i2c bus for %s (pfunc)\n", printk(KERN_ERR "low_i2c: Can't open i2c bus for %pOF (pfunc)\n",
func->node->full_name); func->node);
return NULL; return NULL;
} }
@ -1417,7 +1417,7 @@ static struct pmf_handlers pmac_i2c_pfunc_handlers = {
static void __init pmac_i2c_dev_create(struct device_node *np, int quirks) static void __init pmac_i2c_dev_create(struct device_node *np, int quirks)
{ {
DBG("dev_create(%s)\n", np->full_name); DBG("dev_create(%pOF)\n", np);
pmf_register_driver(np, &pmac_i2c_pfunc_handlers, pmf_register_driver(np, &pmac_i2c_pfunc_handlers,
(void *)(long)quirks); (void *)(long)quirks);
@ -1425,20 +1425,20 @@ static void __init pmac_i2c_dev_create(struct device_node *np, int quirks)
static void __init pmac_i2c_dev_init(struct device_node *np, int quirks) static void __init pmac_i2c_dev_init(struct device_node *np, int quirks)
{ {
DBG("dev_create(%s)\n", np->full_name); DBG("dev_create(%pOF)\n", np);
pmf_do_functions(np, NULL, 0, PMF_FLAGS_ON_INIT, NULL); pmf_do_functions(np, NULL, 0, PMF_FLAGS_ON_INIT, NULL);
} }
static void pmac_i2c_dev_suspend(struct device_node *np, int quirks) static void pmac_i2c_dev_suspend(struct device_node *np, int quirks)
{ {
DBG("dev_suspend(%s)\n", np->full_name); DBG("dev_suspend(%pOF)\n", np);
pmf_do_functions(np, NULL, 0, PMF_FLAGS_ON_SLEEP, NULL); pmf_do_functions(np, NULL, 0, PMF_FLAGS_ON_SLEEP, NULL);
} }
static void pmac_i2c_dev_resume(struct device_node *np, int quirks) static void pmac_i2c_dev_resume(struct device_node *np, int quirks)
{ {
DBG("dev_resume(%s)\n", np->full_name); DBG("dev_resume(%pOF)\n", np);
pmf_do_functions(np, NULL, 0, PMF_FLAGS_ON_WAKE, NULL); pmf_do_functions(np, NULL, 0, PMF_FLAGS_ON_WAKE, NULL);
} }

View File

@ -783,7 +783,7 @@ static int __init pmac_add_bridge(struct device_node *dev)
const int *bus_range; const int *bus_range;
int primary = 1, has_address = 0; int primary = 1, has_address = 0;
DBG("Adding PCI host bridge %s\n", dev->full_name); DBG("Adding PCI host bridge %pOF\n", dev);
/* Fetch host bridge registers address */ /* Fetch host bridge registers address */
has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
@ -791,8 +791,8 @@ static int __init pmac_add_bridge(struct device_node *dev)
/* Get bus range if any */ /* Get bus range if any */
bus_range = of_get_property(dev, "bus-range", &len); bus_range = of_get_property(dev, "bus-range", &len);
if (bus_range == NULL || len < 2 * sizeof(int)) { if (bus_range == NULL || len < 2 * sizeof(int)) {
printk(KERN_WARNING "Can't get bus-range for %s, assume" printk(KERN_WARNING "Can't get bus-range for %pOF, assume"
" bus 0\n", dev->full_name); " bus 0\n", dev);
} }
hose = pcibios_alloc_controller(dev); hose = pcibios_alloc_controller(dev);

View File

@ -54,8 +54,8 @@ static int macio_do_gpio_write(PMF_STD_ARGS, u8 value, u8 mask)
raw_spin_lock_irqsave(&feature_lock, flags); raw_spin_lock_irqsave(&feature_lock, flags);
tmp = readb(addr); tmp = readb(addr);
tmp = (tmp & ~mask) | (value & mask); tmp = (tmp & ~mask) | (value & mask);
DBG("Do write 0x%02x to GPIO %s (%p)\n", DBG("Do write 0x%02x to GPIO %pOF (%p)\n",
tmp, func->node->full_name, addr); tmp, func->node, addr);
writeb(tmp, addr); writeb(tmp, addr);
raw_spin_unlock_irqrestore(&feature_lock, flags); raw_spin_unlock_irqrestore(&feature_lock, flags);
@ -107,8 +107,8 @@ static void macio_gpio_init_one(struct macio_chip *macio)
if (gparent == NULL) if (gparent == NULL)
return; return;
DBG("Installing GPIO functions for macio %s\n", DBG("Installing GPIO functions for macio %pOF\n",
macio->of_node->full_name); macio->of_node);
/* /*
* Ok, got one, we dont need anything special to track them down, so * Ok, got one, we dont need anything special to track them down, so
@ -129,8 +129,8 @@ static void macio_gpio_init_one(struct macio_chip *macio)
pmf_register_driver(gp, &macio_gpio_handlers, (void *)offset); pmf_register_driver(gp, &macio_gpio_handlers, (void *)offset);
} }
DBG("Calling initial GPIO functions for macio %s\n", DBG("Calling initial GPIO functions for macio %pOF\n",
macio->of_node->full_name); macio->of_node);
/* And now we run all the init ones */ /* And now we run all the init ones */
for (gp = NULL; (gp = of_get_next_child(gparent, gp)) != NULL;) for (gp = NULL; (gp = of_get_next_child(gparent, gp)) != NULL;)
@ -267,8 +267,8 @@ static struct pmf_handlers macio_mmio_handlers = {
static void macio_mmio_init_one(struct macio_chip *macio) static void macio_mmio_init_one(struct macio_chip *macio)
{ {
DBG("Installing MMIO functions for macio %s\n", DBG("Installing MMIO functions for macio %pOF\n",
macio->of_node->full_name); macio->of_node);
pmf_register_driver(macio->of_node, &macio_mmio_handlers, macio); pmf_register_driver(macio->of_node, &macio_mmio_handlers, macio);
} }
@ -298,8 +298,8 @@ static void uninorth_install_pfunc(void)
{ {
struct device_node *np; struct device_node *np;
DBG("Installing functions for UniN %s\n", DBG("Installing functions for UniN %pOF\n",
uninorth_node->full_name); uninorth_node);
/* /*
* Install handlers for the bridge itself * Install handlers for the bridge itself
@ -317,8 +317,8 @@ static void uninorth_install_pfunc(void)
break; break;
} }
if (unin_hwclock) { if (unin_hwclock) {
DBG("Installing functions for UniN clock %s\n", DBG("Installing functions for UniN clock %pOF\n",
unin_hwclock->full_name); unin_hwclock);
pmf_register_driver(unin_hwclock, &unin_mmio_handlers, NULL); pmf_register_driver(unin_hwclock, &unin_mmio_handlers, NULL);
pmf_do_functions(unin_hwclock, NULL, 0, PMF_FLAGS_ON_INIT, pmf_do_functions(unin_hwclock, NULL, 0, PMF_FLAGS_ON_INIT,
NULL); NULL);

View File

@ -708,7 +708,7 @@ int pmf_register_driver(struct device_node *np,
if (handlers == NULL) if (handlers == NULL)
return -EINVAL; return -EINVAL;
DBG("pmf: registering driver for node %s\n", np->full_name); DBG("pmf: registering driver for node %pOF\n", np);
spin_lock_irqsave(&pmf_lock, flags); spin_lock_irqsave(&pmf_lock, flags);
dev = pmf_find_device(np); dev = pmf_find_device(np);
@ -781,7 +781,7 @@ void pmf_unregister_driver(struct device_node *np)
struct pmf_device *dev; struct pmf_device *dev;
unsigned long flags; unsigned long flags;
DBG("pmf: unregistering driver for node %s\n", np->full_name); DBG("pmf: unregistering driver for node %pOF\n", np);
spin_lock_irqsave(&pmf_lock, flags); spin_lock_irqsave(&pmf_lock, flags);
dev = pmf_find_device(np); dev = pmf_find_device(np);
@ -940,7 +940,7 @@ int pmf_call_one(struct pmf_function *func, struct pmf_args *args)
void *instdata = NULL; void *instdata = NULL;
int rc = 0; int rc = 0;
DBG(" ** pmf_call_one(%s/%s) **\n", dev->node->full_name, func->name); DBG(" ** pmf_call_one(%pOF/%s) **\n", dev->node, func->name);
if (dev->handlers->begin) if (dev->handlers->begin)
instdata = dev->handlers->begin(func, args); instdata = dev->handlers->begin(func, args);

View File

@ -364,8 +364,8 @@ static void __init pmac_pic_probe_oldstyle(void)
(addr + 0x10); (addr + 0x10);
of_node_put(master); of_node_put(master);
printk(KERN_INFO "irq: Found primary Apple PIC %s for %d irqs\n", printk(KERN_INFO "irq: Found primary Apple PIC %pOF for %d irqs\n",
master->full_name, max_real_irqs); master, max_real_irqs);
/* Map interrupts of cascaded controller */ /* Map interrupts of cascaded controller */
if (slave && !of_address_to_resource(slave, 0, &r)) { if (slave && !of_address_to_resource(slave, 0, &r)) {
@ -378,8 +378,8 @@ static void __init pmac_pic_probe_oldstyle(void)
(addr + 0x10); (addr + 0x10);
pmac_irq_cascade = irq_of_parse_and_map(slave, 0); pmac_irq_cascade = irq_of_parse_and_map(slave, 0);
printk(KERN_INFO "irq: Found slave Apple PIC %s for %d irqs" printk(KERN_INFO "irq: Found slave Apple PIC %pOF for %d irqs"
" cascade: %d\n", slave->full_name, " cascade: %d\n", slave,
max_irqs - max_real_irqs, pmac_irq_cascade); max_irqs - max_real_irqs, pmac_irq_cascade);
} }
of_node_put(slave); of_node_put(slave);

View File

@ -556,7 +556,7 @@ static int __init check_pmac_serial_console(void)
pr_debug(" can't find stdout package %s !\n", name); pr_debug(" can't find stdout package %s !\n", name);
return -ENODEV; return -ENODEV;
} }
pr_debug("stdout is %s\n", prom_stdout->full_name); pr_debug("stdout is %pOF\n", prom_stdout);
name = of_get_property(prom_stdout, "name", NULL); name = of_get_property(prom_stdout, "name", NULL);
if (!name) { if (!name) {

View File

@ -171,8 +171,8 @@ int __init opal_async_comp_init(void)
async = of_get_property(opal_node, "opal-msg-async-num", NULL); async = of_get_property(opal_node, "opal-msg-async-num", NULL);
if (!async) { if (!async) {
pr_err("%s: %s has no opal-msg-async-num\n", pr_err("%s: %pOF has no opal-msg-async-num\n",
__func__, opal_node->full_name); __func__, opal_node);
err = -ENOENT; err = -ENOENT;
goto out_opal_node; goto out_opal_node;
} }

View File

@ -36,14 +36,14 @@ static scom_map_t opal_scom_map(struct device_node *dev, u64 reg, u64 count)
const __be32 *gcid; const __be32 *gcid;
if (!of_get_property(dev, "scom-controller", NULL)) { if (!of_get_property(dev, "scom-controller", NULL)) {
pr_err("%s: device %s is not a SCOM controller\n", pr_err("%s: device %pOF is not a SCOM controller\n",
__func__, dev->full_name); __func__, dev);
return SCOM_MAP_INVALID; return SCOM_MAP_INVALID;
} }
gcid = of_get_property(dev, "ibm,chip-id", NULL); gcid = of_get_property(dev, "ibm,chip-id", NULL);
if (!gcid) { if (!gcid) {
pr_err("%s: device %s has no ibm,chip-id\n", pr_err("%s: device %pOF has no ibm,chip-id\n",
__func__, dev->full_name); __func__, dev);
return SCOM_MAP_INVALID; return SCOM_MAP_INVALID;
} }
m = kmalloc(sizeof(struct opal_scom_map), GFP_KERNEL); m = kmalloc(sizeof(struct opal_scom_map), GFP_KERNEL);

View File

@ -444,8 +444,8 @@ static void __init pnv_ioda_parse_m64_window(struct pnv_phb *phb)
r = of_get_property(dn, "ibm,opal-m64-window", NULL); r = of_get_property(dn, "ibm,opal-m64-window", NULL);
if (!r) { if (!r) {
pr_info(" No <ibm,opal-m64-window> on %s\n", pr_info(" No <ibm,opal-m64-window> on %pOF\n",
dn->full_name); dn);
return; return;
} }
@ -3796,8 +3796,7 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np,
if (!of_device_is_available(np)) if (!of_device_is_available(np))
return; return;
pr_info("Initializing %s PHB (%s)\n", pr_info("Initializing %s PHB (%pOF)\n", pnv_phb_names[ioda_type], np);
pnv_phb_names[ioda_type], of_node_full_name(np));
prop64 = of_get_property(np, "ibm,opal-phbid", NULL); prop64 = of_get_property(np, "ibm,opal-phbid", NULL);
if (!prop64) { if (!prop64) {
@ -3812,8 +3811,8 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np,
/* Allocate PCI controller */ /* Allocate PCI controller */
phb->hose = hose = pcibios_alloc_controller(np); phb->hose = hose = pcibios_alloc_controller(np);
if (!phb->hose) { if (!phb->hose) {
pr_err(" Can't allocate PCI controller for %s\n", pr_err(" Can't allocate PCI controller for %pOF\n",
np->full_name); np);
memblock_free(__pa(phb), sizeof(struct pnv_phb)); memblock_free(__pa(phb), sizeof(struct pnv_phb));
return; return;
} }
@ -3824,7 +3823,7 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np,
hose->first_busno = be32_to_cpu(prop32[0]); hose->first_busno = be32_to_cpu(prop32[0]);
hose->last_busno = be32_to_cpu(prop32[1]); hose->last_busno = be32_to_cpu(prop32[1]);
} else { } else {
pr_warn(" Broken <bus-range> on %s\n", np->full_name); pr_warn(" Broken <bus-range> on %pOF\n", np);
hose->first_busno = 0; hose->first_busno = 0;
hose->last_busno = 0xff; hose->last_busno = 0xff;
} }
@ -4045,7 +4044,7 @@ void __init pnv_pci_init_ioda_hub(struct device_node *np)
const __be64 *prop64; const __be64 *prop64;
u64 hub_id; u64 hub_id;
pr_info("Probing IODA IO-Hub %s\n", np->full_name); pr_info("Probing IODA IO-Hub %pOF\n", np);
prop64 = of_get_property(np, "ibm,opal-hubid", NULL); prop64 = of_get_property(np, "ibm,opal-hubid", NULL);
if (!prop64) { if (!prop64) {

View File

@ -125,7 +125,7 @@ static __init void rng_init_per_cpu(struct powernv_rng *rng,
chip_id = of_get_ibm_chip_id(dn); chip_id = of_get_ibm_chip_id(dn);
if (chip_id == -1) if (chip_id == -1)
pr_warn("No ibm,chip-id found for %s.\n", dn->full_name); pr_warn("No ibm,chip-id found for %pOF.\n", dn);
for_each_possible_cpu(cpu) { for_each_possible_cpu(cpu) {
if (per_cpu(powernv_rng, cpu) == NULL || if (per_cpu(powernv_rng, cpu) == NULL ||
@ -178,8 +178,8 @@ static __init int rng_init(void)
for_each_compatible_node(dn, NULL, "ibm,power-rng") { for_each_compatible_node(dn, NULL, "ibm,power-rng") {
rc = rng_create(dn); rc = rng_create(dn);
if (rc) { if (rc) {
pr_err("Failed creating rng for %s (%d).\n", pr_err("Failed creating rng for %pOF (%d).\n",
dn->full_name, rc); dn, rc);
continue; continue;
} }

View File

@ -264,8 +264,7 @@ int dlpar_attach_node(struct device_node *dn)
rc = of_attach_node(dn); rc = of_attach_node(dn);
if (rc) { if (rc) {
printk(KERN_ERR "Failed to add device node %s\n", printk(KERN_ERR "Failed to add device node %pOF\n", dn);
dn->full_name);
return rc; return rc;
} }

View File

@ -36,8 +36,8 @@ void request_event_sources_irqs(struct device_node *np,
virqs[count] = irq_create_of_mapping(&oirq); virqs[count] = irq_create_of_mapping(&oirq);
if (!virqs[count]) { if (!virqs[count]) {
pr_err("event-sources: Unable to allocate " pr_err("event-sources: Unable to allocate "
"interrupt number for %s\n", "interrupt number for %pOF\n",
np->full_name); np);
WARN_ON(1); WARN_ON(1);
} else { } else {
count++; count++;
@ -48,7 +48,7 @@ void request_event_sources_irqs(struct device_node *np,
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
if (request_irq(virqs[i], handler, 0, name, NULL)) { if (request_irq(virqs[i], handler, 0, name, NULL)) {
pr_err("event-sources: Unable to request interrupt " pr_err("event-sources: Unable to request interrupt "
"%d for %s\n", virqs[i], np->full_name); "%d for %pOF\n", virqs[i], np);
WARN_ON(1); WARN_ON(1);
return; return;
} }

View File

@ -264,8 +264,8 @@ static int pseries_add_processor(struct device_node *np)
/* If we get here, it most likely means that NR_CPUS is /* If we get here, it most likely means that NR_CPUS is
* less than the partition's max processors setting. * less than the partition's max processors setting.
*/ */
printk(KERN_ERR "Cannot add cpu %s; this system configuration" printk(KERN_ERR "Cannot add cpu %pOF; this system configuration"
" supports %d logical cpus.\n", np->full_name, " supports %d logical cpus.\n", np,
num_possible_cpus()); num_possible_cpus());
goto out_unlock; goto out_unlock;
} }

View File

@ -150,8 +150,7 @@ static const struct dma_map_ops ibmebus_dma_ops = {
static int ibmebus_match_path(struct device *dev, void *data) static int ibmebus_match_path(struct device *dev, void *data)
{ {
struct device_node *dn = to_platform_device(dev)->dev.of_node; struct device_node *dn = to_platform_device(dev)->dev.of_node;
return (dn->full_name && return (of_find_node_by_path(data) == dn);
(strcasecmp((char *)data, dn->full_name) == 0));
} }
static int ibmebus_match_node(struct device *dev, void *data) static int ibmebus_match_node(struct device *dev, void *data)
@ -395,7 +394,7 @@ static ssize_t devspec_show(struct device *dev,
struct platform_device *ofdev; struct platform_device *ofdev;
ofdev = to_platform_device(dev); ofdev = to_platform_device(dev);
return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name); return sprintf(buf, "%pOF\n", ofdev->dev.of_node);
} }
static DEVICE_ATTR_RO(devspec); static DEVICE_ATTR_RO(devspec);

View File

@ -511,8 +511,8 @@ static void iommu_table_setparms(struct pci_controller *phb,
basep = of_get_property(node, "linux,tce-base", NULL); basep = of_get_property(node, "linux,tce-base", NULL);
sizep = of_get_property(node, "linux,tce-size", NULL); sizep = of_get_property(node, "linux,tce-size", NULL);
if (basep == NULL || sizep == NULL) { if (basep == NULL || sizep == NULL) {
printk(KERN_ERR "PCI_DMA: iommu_table_setparms: %s has " printk(KERN_ERR "PCI_DMA: iommu_table_setparms: %pOF has "
"missing tce entries !\n", dn->full_name); "missing tce entries !\n", dn);
return; return;
} }
@ -587,7 +587,7 @@ static void pci_dma_bus_setup_pSeries(struct pci_bus *bus)
dn = pci_bus_to_OF_node(bus); dn = pci_bus_to_OF_node(bus);
pr_debug("pci_dma_bus_setup_pSeries: setting up bus %s\n", dn->full_name); pr_debug("pci_dma_bus_setup_pSeries: setting up bus %pOF\n", dn);
if (bus->self) { if (bus->self) {
/* This is not a root bus, any setup will be done for the /* This is not a root bus, any setup will be done for the
@ -701,8 +701,8 @@ static void pci_dma_bus_setup_pSeriesLP(struct pci_bus *bus)
dn = pci_bus_to_OF_node(bus); dn = pci_bus_to_OF_node(bus);
pr_debug("pci_dma_bus_setup_pSeriesLP: setting up bus %s\n", pr_debug("pci_dma_bus_setup_pSeriesLP: setting up bus %pOF\n",
dn->full_name); dn);
/* Find nearest ibm,dma-window, walking up the device tree */ /* Find nearest ibm,dma-window, walking up the device tree */
for (pdn = dn; pdn != NULL; pdn = pdn->parent) { for (pdn = dn; pdn != NULL; pdn = pdn->parent) {
@ -718,8 +718,8 @@ static void pci_dma_bus_setup_pSeriesLP(struct pci_bus *bus)
ppci = PCI_DN(pdn); ppci = PCI_DN(pdn);
pr_debug(" parent is %s, iommu_table: 0x%p\n", pr_debug(" parent is %pOF, iommu_table: 0x%p\n",
pdn->full_name, ppci->table_group); pdn, ppci->table_group);
if (!ppci->table_group) { if (!ppci->table_group) {
ppci->table_group = iommu_pseries_alloc_group(ppci->phb->node); ppci->table_group = iommu_pseries_alloc_group(ppci->phb->node);
@ -817,28 +817,28 @@ static void remove_ddw(struct device_node *np, bool remove_prop)
ret = tce_clearrange_multi_pSeriesLP(0, ret = tce_clearrange_multi_pSeriesLP(0,
1ULL << (be32_to_cpu(dwp->window_shift) - PAGE_SHIFT), dwp); 1ULL << (be32_to_cpu(dwp->window_shift) - PAGE_SHIFT), dwp);
if (ret) if (ret)
pr_warning("%s failed to clear tces in window.\n", pr_warning("%pOF failed to clear tces in window.\n",
np->full_name); np);
else else
pr_debug("%s successfully cleared tces in window.\n", pr_debug("%pOF successfully cleared tces in window.\n",
np->full_name); np);
ret = rtas_call(ddw_avail[2], 1, 1, NULL, liobn); ret = rtas_call(ddw_avail[2], 1, 1, NULL, liobn);
if (ret) if (ret)
pr_warning("%s: failed to remove direct window: rtas returned " pr_warning("%pOF: failed to remove direct window: rtas returned "
"%d to ibm,remove-pe-dma-window(%x) %llx\n", "%d to ibm,remove-pe-dma-window(%x) %llx\n",
np->full_name, ret, ddw_avail[2], liobn); np, ret, ddw_avail[2], liobn);
else else
pr_debug("%s: successfully removed direct window: rtas returned " pr_debug("%pOF: successfully removed direct window: rtas returned "
"%d to ibm,remove-pe-dma-window(%x) %llx\n", "%d to ibm,remove-pe-dma-window(%x) %llx\n",
np->full_name, ret, ddw_avail[2], liobn); np, ret, ddw_avail[2], liobn);
delprop: delprop:
if (remove_prop) if (remove_prop)
ret = of_remove_property(np, win64); ret = of_remove_property(np, win64);
if (ret) if (ret)
pr_warning("%s: failed to remove direct window property: %d\n", pr_warning("%pOF: failed to remove direct window property: %d\n",
np->full_name, ret); np, ret);
} }
static u64 find_existing_ddw(struct device_node *pdn) static u64 find_existing_ddw(struct device_node *pdn)
@ -1004,7 +1004,7 @@ static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
* list. * list.
*/ */
list_for_each_entry(fpdn, &failed_ddw_pdn_list, list) { list_for_each_entry(fpdn, &failed_ddw_pdn_list, list) {
if (!strcmp(fpdn->pdn->full_name, pdn->full_name)) if (fpdn->pdn == pdn)
goto out_unlock; goto out_unlock;
} }
@ -1087,8 +1087,8 @@ static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
ddwprop->tce_shift = cpu_to_be32(page_shift); ddwprop->tce_shift = cpu_to_be32(page_shift);
ddwprop->window_shift = cpu_to_be32(len); ddwprop->window_shift = cpu_to_be32(len);
dev_dbg(&dev->dev, "created tce table LIOBN 0x%x for %s\n", dev_dbg(&dev->dev, "created tce table LIOBN 0x%x for %pOF\n",
create.liobn, dn->full_name); create.liobn, dn);
window = kzalloc(sizeof(*window), GFP_KERNEL); window = kzalloc(sizeof(*window), GFP_KERNEL);
if (!window) if (!window)
@ -1097,15 +1097,15 @@ static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
ret = walk_system_ram_range(0, memblock_end_of_DRAM() >> PAGE_SHIFT, ret = walk_system_ram_range(0, memblock_end_of_DRAM() >> PAGE_SHIFT,
win64->value, tce_setrange_multi_pSeriesLP_walk); win64->value, tce_setrange_multi_pSeriesLP_walk);
if (ret) { if (ret) {
dev_info(&dev->dev, "failed to map direct window for %s: %d\n", dev_info(&dev->dev, "failed to map direct window for %pOF: %d\n",
dn->full_name, ret); dn, ret);
goto out_free_window; goto out_free_window;
} }
ret = of_add_property(pdn, win64); ret = of_add_property(pdn, win64);
if (ret) { if (ret) {
dev_err(&dev->dev, "unable to add dma window property for %s: %d", dev_err(&dev->dev, "unable to add dma window property for %pOF: %d",
pdn->full_name, ret); pdn, ret);
goto out_free_window; goto out_free_window;
} }
@ -1158,7 +1158,7 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
* already allocated. * already allocated.
*/ */
dn = pci_device_to_OF_node(dev); dn = pci_device_to_OF_node(dev);
pr_debug(" node is %s\n", dn->full_name); pr_debug(" node is %pOF\n", dn);
for (pdn = dn; pdn && PCI_DN(pdn) && !PCI_DN(pdn)->table_group; for (pdn = dn; pdn && PCI_DN(pdn) && !PCI_DN(pdn)->table_group;
pdn = pdn->parent) { pdn = pdn->parent) {
@ -1169,11 +1169,11 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
if (!pdn || !PCI_DN(pdn)) { if (!pdn || !PCI_DN(pdn)) {
printk(KERN_WARNING "pci_dma_dev_setup_pSeriesLP: " printk(KERN_WARNING "pci_dma_dev_setup_pSeriesLP: "
"no DMA window found for pci dev=%s dn=%s\n", "no DMA window found for pci dev=%s dn=%pOF\n",
pci_name(dev), of_node_full_name(dn)); pci_name(dev), dn);
return; return;
} }
pr_debug(" parent is %s\n", pdn->full_name); pr_debug(" parent is %pOF\n", pdn);
pci = PCI_DN(pdn); pci = PCI_DN(pdn);
if (!pci->table_group) { if (!pci->table_group) {
@ -1213,7 +1213,7 @@ static int dma_set_mask_pSeriesLP(struct device *dev, u64 dma_mask)
/* only attempt to use a new window if 64-bit DMA is requested */ /* only attempt to use a new window if 64-bit DMA is requested */
if (!disable_ddw && dma_mask == DMA_BIT_MASK(64)) { if (!disable_ddw && dma_mask == DMA_BIT_MASK(64)) {
dn = pci_device_to_OF_node(pdev); dn = pci_device_to_OF_node(pdev);
dev_dbg(dev, "node is %s\n", dn->full_name); dev_dbg(dev, "node is %pOF\n", dn);
/* /*
* the device tree might contain the dma-window properties * the device tree might contain the dma-window properties

View File

@ -144,7 +144,7 @@ static int check_req(struct pci_dev *pdev, int nvec, char *prop_name)
p = of_get_property(dn, prop_name, NULL); p = of_get_property(dn, prop_name, NULL);
if (!p) { if (!p) {
pr_debug("rtas_msi: No %s on %s\n", prop_name, dn->full_name); pr_debug("rtas_msi: No %s on %pOF\n", prop_name, dn);
return -ENOENT; return -ENOENT;
} }
@ -182,8 +182,8 @@ static struct device_node *find_pe_total_msi(struct pci_dev *dev, int *total)
while (dn) { while (dn) {
p = of_get_property(dn, "ibm,pe-total-#msi", NULL); p = of_get_property(dn, "ibm,pe-total-#msi", NULL);
if (p) { if (p) {
pr_debug("rtas_msi: found prop on dn %s\n", pr_debug("rtas_msi: found prop on dn %pOF\n",
dn->full_name); dn);
*total = be32_to_cpup(p); *total = be32_to_cpup(p);
return dn; return dn;
} }
@ -222,7 +222,7 @@ static struct device_node *find_pe_dn(struct pci_dev *dev, int *total)
/* Hardcode of 8 for old firmwares */ /* Hardcode of 8 for old firmwares */
*total = 8; *total = 8;
pr_debug("rtas_msi: using PE dn %s\n", dn->full_name); pr_debug("rtas_msi: using PE dn %pOF\n", dn);
return dn; return dn;
} }
@ -242,7 +242,7 @@ static void *count_non_bridge_devices(struct device_node *dn, void *data)
const __be32 *p; const __be32 *p;
u32 class; u32 class;
pr_debug("rtas_msi: counting %s\n", dn->full_name); pr_debug("rtas_msi: counting %pOF\n", dn);
p = of_get_property(dn, "class-code", NULL); p = of_get_property(dn, "class-code", NULL);
class = p ? be32_to_cpup(p) : 0; class = p ? be32_to_cpup(p) : 0;
@ -300,7 +300,7 @@ static int msi_quota_for_device(struct pci_dev *dev, int request)
goto out; goto out;
} }
pr_debug("rtas_msi: found PE %s\n", pe_dn->full_name); pr_debug("rtas_msi: found PE %pOF\n", pe_dn);
memset(&counts, 0, sizeof(struct msi_counts)); memset(&counts, 0, sizeof(struct msi_counts));

View File

@ -38,7 +38,7 @@ struct pci_controller *init_phb_dynamic(struct device_node *dn)
{ {
struct pci_controller *phb; struct pci_controller *phb;
pr_debug("PCI: Initializing new hotplug PHB %s\n", dn->full_name); pr_debug("PCI: Initializing new hotplug PHB %pOF\n", dn);
phb = pcibios_alloc_controller(dn); phb = pcibios_alloc_controller(dn);
if (!phb) if (!phb)

View File

@ -1362,9 +1362,9 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node)
else if (!strcmp(parent_node->type, "vdevice")) else if (!strcmp(parent_node->type, "vdevice"))
family = VDEVICE; family = VDEVICE;
else { else {
pr_warn("%s: parent(%s) of %s not recognized.\n", pr_warn("%s: parent(%pOF) of %s not recognized.\n",
__func__, __func__,
parent_node->full_name, parent_node,
of_node_name); of_node_name);
of_node_put(parent_node); of_node_put(parent_node);
return NULL; return NULL;
@ -1555,7 +1555,7 @@ static ssize_t devspec_show(struct device *dev,
{ {
struct device_node *of_node = dev->of_node; struct device_node *of_node = dev->of_node;
return sprintf(buf, "%s\n", of_node_full_name(of_node)); return sprintf(buf, "%pOF\n", of_node);
} }
static DEVICE_ATTR_RO(devspec); static DEVICE_ATTR_RO(devspec);

View File

@ -188,8 +188,8 @@ static int axon_ram_probe(struct platform_device *device)
axon_ram_bank_id++; axon_ram_bank_id++;
dev_info(&device->dev, "Found memory controller on %s\n", dev_info(&device->dev, "Found memory controller on %pOF\n",
device->dev.of_node->full_name); device->dev.of_node);
bank = kzalloc(sizeof(struct axon_ram_bank), GFP_KERNEL); bank = kzalloc(sizeof(struct axon_ram_bank), GFP_KERNEL);
if (bank == NULL) { if (bank == NULL) {

View File

@ -195,8 +195,8 @@ dcr_host_mmio_t dcr_map_mmio(struct device_node *dev,
dcr_host_mmio_t ret = { .token = NULL, .stride = 0, .base = dcr_n }; dcr_host_mmio_t ret = { .token = NULL, .stride = 0, .base = dcr_n };
u64 addr; u64 addr;
pr_debug("dcr_map(%s, 0x%x, 0x%x)\n", pr_debug("dcr_map(%pOF, 0x%x, 0x%x)\n",
dev->full_name, dcr_n, dcr_c); dev, dcr_n, dcr_c);
addr = of_translate_dcr_address(dev, dcr_n, &ret.stride); addr = of_translate_dcr_address(dev, dcr_n, &ret.stride);
pr_debug("translates to addr: 0x%llx, stride: 0x%x\n", pr_debug("translates to addr: 0x%llx, stride: 0x%x\n",

View File

@ -101,8 +101,8 @@ int __init instantiate_cache_sram(struct platform_device *dev,
if (!request_mem_region(cache_sram->base_phys, cache_sram->size, if (!request_mem_region(cache_sram->base_phys, cache_sram->size,
"fsl_85xx_cache_sram")) { "fsl_85xx_cache_sram")) {
dev_err(&dev->dev, "%s: request memory failed\n", dev_err(&dev->dev, "%pOF: request memory failed\n",
dev->dev.of_node->full_name); dev->dev.of_node);
ret = -ENXIO; ret = -ENXIO;
goto out_free; goto out_free;
} }
@ -110,16 +110,16 @@ int __init instantiate_cache_sram(struct platform_device *dev,
cache_sram->base_virt = ioremap_prot(cache_sram->base_phys, cache_sram->base_virt = ioremap_prot(cache_sram->base_phys,
cache_sram->size, _PAGE_COHERENT | PAGE_KERNEL); cache_sram->size, _PAGE_COHERENT | PAGE_KERNEL);
if (!cache_sram->base_virt) { if (!cache_sram->base_virt) {
dev_err(&dev->dev, "%s: ioremap_prot failed\n", dev_err(&dev->dev, "%pOF: ioremap_prot failed\n",
dev->dev.of_node->full_name); dev->dev.of_node);
ret = -ENOMEM; ret = -ENOMEM;
goto out_release; goto out_release;
} }
cache_sram->rh = rh_create(sizeof(unsigned int)); cache_sram->rh = rh_create(sizeof(unsigned int));
if (IS_ERR(cache_sram->rh)) { if (IS_ERR(cache_sram->rh)) {
dev_err(&dev->dev, "%s: Unable to create remote heap\n", dev_err(&dev->dev, "%pOF: Unable to create remote heap\n",
dev->dev.of_node->full_name); dev->dev.of_node);
ret = PTR_ERR(cache_sram->rh); ret = PTR_ERR(cache_sram->rh);
goto out_unmap; goto out_unmap;
} }

View File

@ -388,8 +388,8 @@ static int __init fsl_gtm_init(void)
gtm = kzalloc(sizeof(*gtm), GFP_KERNEL); gtm = kzalloc(sizeof(*gtm), GFP_KERNEL);
if (!gtm) { if (!gtm) {
pr_err("%s: unable to allocate memory\n", pr_err("%pOF: unable to allocate memory\n",
np->full_name); np);
continue; continue;
} }
@ -397,7 +397,7 @@ static int __init fsl_gtm_init(void)
clock = of_get_property(np, "clock-frequency", &size); clock = of_get_property(np, "clock-frequency", &size);
if (!clock || size != sizeof(*clock)) { if (!clock || size != sizeof(*clock)) {
pr_err("%s: no clock-frequency\n", np->full_name); pr_err("%pOF: no clock-frequency\n", np);
goto err; goto err;
} }
gtm->clock = *clock; gtm->clock = *clock;
@ -407,8 +407,8 @@ static int __init fsl_gtm_init(void)
irq = irq_of_parse_and_map(np, i); irq = irq_of_parse_and_map(np, i);
if (!irq) { if (!irq) {
pr_err("%s: not enough interrupts specified\n", pr_err("%pOF: not enough interrupts specified\n",
np->full_name); np);
goto err; goto err;
} }
gtm->timers[i].irq = irq; gtm->timers[i].irq = irq;
@ -417,8 +417,8 @@ static int __init fsl_gtm_init(void)
gtm->regs = of_iomap(np, 0); gtm->regs = of_iomap(np, 0);
if (!gtm->regs) { if (!gtm->regs) {
pr_err("%s: unable to iomap registers\n", pr_err("%pOF: unable to iomap registers\n",
np->full_name); np);
goto err; goto err;
} }

View File

@ -214,8 +214,8 @@ static int fsl_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
phandle = np->phandle; phandle = np->phandle;
else { else {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"node %s has an invalid fsl,msi phandle %u\n", "node %pOF has an invalid fsl,msi phandle %u\n",
hose->dn->full_name, np->phandle); hose->dn, np->phandle);
return -EINVAL; return -EINVAL;
} }
} }
@ -438,16 +438,16 @@ static int fsl_of_msi_probe(struct platform_device *dev)
if ((features->fsl_pic_ip & FSL_PIC_IP_MASK) != FSL_PIC_IP_VMPIC) { if ((features->fsl_pic_ip & FSL_PIC_IP_MASK) != FSL_PIC_IP_VMPIC) {
err = of_address_to_resource(dev->dev.of_node, 0, &res); err = of_address_to_resource(dev->dev.of_node, 0, &res);
if (err) { if (err) {
dev_err(&dev->dev, "invalid resource for node %s\n", dev_err(&dev->dev, "invalid resource for node %pOF\n",
dev->dev.of_node->full_name); dev->dev.of_node);
goto error_out; goto error_out;
} }
msi->msi_regs = ioremap(res.start, resource_size(&res)); msi->msi_regs = ioremap(res.start, resource_size(&res));
if (!msi->msi_regs) { if (!msi->msi_regs) {
err = -ENOMEM; err = -ENOMEM;
dev_err(&dev->dev, "could not map node %s\n", dev_err(&dev->dev, "could not map node %pOF\n",
dev->dev.of_node->full_name); dev->dev.of_node);
goto error_out; goto error_out;
} }
msi->msiir_offset = msi->msiir_offset =
@ -522,8 +522,8 @@ static int fsl_of_msi_probe(struct platform_device *dev)
for (irq_index = 0, i = 0; i < len / (2 * sizeof(u32)); i++) { for (irq_index = 0, i = 0; i < len / (2 * sizeof(u32)); i++) {
if (p[i * 2] % IRQS_PER_MSI_REG || if (p[i * 2] % IRQS_PER_MSI_REG ||
p[i * 2 + 1] % IRQS_PER_MSI_REG) { p[i * 2 + 1] % IRQS_PER_MSI_REG) {
pr_warn("%s: %s: msi available range of %u at %u is not IRQ-aligned\n", pr_warn("%s: %pOF: msi available range of %u at %u is not IRQ-aligned\n",
__func__, dev->dev.of_node->full_name, __func__, dev->dev.of_node,
p[i * 2 + 1], p[i * 2]); p[i * 2 + 1], p[i * 2]);
err = -EINVAL; err = -EINVAL;
goto error_out; goto error_out;

View File

@ -202,7 +202,6 @@ static void setup_pci_atmu(struct pci_controller *hose)
u32 pcicsrbar = 0, pcicsrbar_sz; u32 pcicsrbar = 0, pcicsrbar_sz;
u32 piwar = PIWAR_EN | PIWAR_PF | PIWAR_TGI_LOCAL | u32 piwar = PIWAR_EN | PIWAR_PF | PIWAR_TGI_LOCAL |
PIWAR_READ_SNOOP | PIWAR_WRITE_SNOOP; PIWAR_READ_SNOOP | PIWAR_WRITE_SNOOP;
const char *name = hose->dn->full_name;
const u64 *reg; const u64 *reg;
int len; int len;
bool setup_inbound; bool setup_inbound;
@ -290,12 +289,12 @@ static void setup_pci_atmu(struct pci_controller *hose)
paddr_lo -= offset; paddr_lo -= offset;
if (paddr_hi == paddr_lo) { if (paddr_hi == paddr_lo) {
pr_err("%s: No outbound window space\n", name); pr_err("%pOF: No outbound window space\n", hose->dn);
return; return;
} }
if (paddr_lo == 0) { if (paddr_lo == 0) {
pr_err("%s: No space for inbound window\n", name); pr_err("%pOF: No space for inbound window\n", hose->dn);
return; return;
} }
@ -313,7 +312,7 @@ static void setup_pci_atmu(struct pci_controller *hose)
paddr_lo = min(paddr_lo, (u64)pcicsrbar); paddr_lo = min(paddr_lo, (u64)pcicsrbar);
pr_info("%s: PCICSRBAR @ 0x%x\n", name, pcicsrbar); pr_info("%pOF: PCICSRBAR @ 0x%x\n", hose->dn, pcicsrbar);
/* Setup inbound mem window */ /* Setup inbound mem window */
mem = memblock_end_of_DRAM(); mem = memblock_end_of_DRAM();
@ -336,12 +335,12 @@ static void setup_pci_atmu(struct pci_controller *hose)
u64 address = be64_to_cpup(reg); u64 address = be64_to_cpup(reg);
if ((address >= mem) && (address < (mem + PAGE_SIZE))) { if ((address >= mem) && (address < (mem + PAGE_SIZE))) {
pr_info("%s: extending DDR ATMU to cover MSIIR", name); pr_info("%pOF: extending DDR ATMU to cover MSIIR", hose->dn);
mem += PAGE_SIZE; mem += PAGE_SIZE;
} else { } else {
/* TODO: Create a new ATMU for MSIIR */ /* TODO: Create a new ATMU for MSIIR */
pr_warn("%s: msi-address-64 address of %llx is " pr_warn("%pOF: msi-address-64 address of %llx is "
"unsupported\n", name, address); "unsupported\n", hose->dn, address);
} }
} }
@ -354,8 +353,8 @@ static void setup_pci_atmu(struct pci_controller *hose)
if ((1ull << mem_log) != mem) { if ((1ull << mem_log) != mem) {
mem_log++; mem_log++;
if ((1ull << mem_log) > mem) if ((1ull << mem_log) > mem)
pr_info("%s: Setting PCI inbound window " pr_info("%pOF: Setting PCI inbound window "
"greater than memory size\n", name); "greater than memory size\n", hose->dn);
} }
piwar |= ((mem_log - 1) & PIWAR_SZ_MASK); piwar |= ((mem_log - 1) & PIWAR_SZ_MASK);
@ -402,7 +401,7 @@ static void setup_pci_atmu(struct pci_controller *hose)
*/ */
ppc_md.dma_set_mask = fsl_pci_dma_set_mask; ppc_md.dma_set_mask = fsl_pci_dma_set_mask;
pr_info("%s: Setup 64-bit PCI DMA window\n", name); pr_info("%pOF: Setup 64-bit PCI DMA window\n", hose->dn);
} }
} else { } else {
u64 paddr = 0; u64 paddr = 0;
@ -443,18 +442,18 @@ static void setup_pci_atmu(struct pci_controller *hose)
#ifdef CONFIG_SWIOTLB #ifdef CONFIG_SWIOTLB
ppc_swiotlb_enable = 1; ppc_swiotlb_enable = 1;
#else #else
pr_err("%s: ERROR: Memory size exceeds PCI ATMU ability to " pr_err("%pOF: ERROR: Memory size exceeds PCI ATMU ability to "
"map - enable CONFIG_SWIOTLB to avoid dma errors.\n", "map - enable CONFIG_SWIOTLB to avoid dma errors.\n",
name); hose->dn);
#endif #endif
/* adjusting outbound windows could reclaim space in mem map */ /* adjusting outbound windows could reclaim space in mem map */
if (paddr_hi < 0xffffffffull) if (paddr_hi < 0xffffffffull)
pr_warning("%s: WARNING: Outbound window cfg leaves " pr_warning("%pOF: WARNING: Outbound window cfg leaves "
"gaps in memory map. Adjusting the memory map " "gaps in memory map. Adjusting the memory map "
"could reduce unnecessary bounce buffering.\n", "could reduce unnecessary bounce buffering.\n",
name); hose->dn);
pr_info("%s: DMA window size is 0x%llx\n", name, pr_info("%pOF: DMA window size is 0x%llx\n", hose->dn,
(u64)hose->dma_window_size); (u64)hose->dma_window_size);
} }
} }
@ -532,11 +531,11 @@ int fsl_add_bridge(struct platform_device *pdev, int is_primary)
dev = pdev->dev.of_node; dev = pdev->dev.of_node;
if (!of_device_is_available(dev)) { if (!of_device_is_available(dev)) {
pr_warning("%s: disabled\n", dev->full_name); pr_warning("%pOF: disabled\n", dev);
return -ENODEV; return -ENODEV;
} }
pr_debug("Adding PCI host bridge %s\n", dev->full_name); pr_debug("Adding PCI host bridge %pOF\n", dev);
/* Fetch host bridge registers address */ /* Fetch host bridge registers address */
if (of_address_to_resource(dev, 0, &rsrc)) { if (of_address_to_resource(dev, 0, &rsrc)) {
@ -547,8 +546,8 @@ int fsl_add_bridge(struct platform_device *pdev, int is_primary)
/* Get bus range if any */ /* Get bus range if any */
bus_range = of_get_property(dev, "bus-range", &len); bus_range = of_get_property(dev, "bus-range", &len);
if (bus_range == NULL || len < 2 * sizeof(int)) if (bus_range == NULL || len < 2 * sizeof(int))
printk(KERN_WARNING "Can't get bus-range for %s, assume" printk(KERN_WARNING "Can't get bus-range for %pOF, assume"
" bus 0\n", dev->full_name); " bus 0\n", dev);
pci_add_flags(PCI_REASSIGN_ALL_BUS); pci_add_flags(PCI_REASSIGN_ALL_BUS);
hose = pcibios_alloc_controller(dev); hose = pcibios_alloc_controller(dev);
@ -809,11 +808,11 @@ int __init mpc83xx_add_bridge(struct device_node *dev)
is_mpc83xx_pci = 1; is_mpc83xx_pci = 1;
if (!of_device_is_available(dev)) { if (!of_device_is_available(dev)) {
pr_warning("%s: disabled by the firmware.\n", pr_warning("%pOF: disabled by the firmware.\n",
dev->full_name); dev);
return -ENODEV; return -ENODEV;
} }
pr_debug("Adding PCI host bridge %s\n", dev->full_name); pr_debug("Adding PCI host bridge %pOF\n", dev);
/* Fetch host bridge registers address */ /* Fetch host bridge registers address */
if (of_address_to_resource(dev, 0, &rsrc_reg)) { if (of_address_to_resource(dev, 0, &rsrc_reg)) {
@ -848,8 +847,8 @@ int __init mpc83xx_add_bridge(struct device_node *dev)
/* Get bus range if any */ /* Get bus range if any */
bus_range = of_get_property(dev, "bus-range", &len); bus_range = of_get_property(dev, "bus-range", &len);
if (bus_range == NULL || len < 2 * sizeof(int)) { if (bus_range == NULL || len < 2 * sizeof(int)) {
printk(KERN_WARNING "Can't get bus-range for %s, assume" printk(KERN_WARNING "Can't get bus-range for %pOF, assume"
" bus 0\n", dev->full_name); " bus 0\n", dev);
} }
pci_add_flags(PCI_REASSIGN_ALL_BUS); pci_add_flags(PCI_REASSIGN_ALL_BUS);

View File

@ -450,12 +450,12 @@ int fsl_rio_setup(struct platform_device *dev)
rc = of_address_to_resource(dev->dev.of_node, 0, &regs); rc = of_address_to_resource(dev->dev.of_node, 0, &regs);
if (rc) { if (rc) {
dev_err(&dev->dev, "Can't get %s property 'reg'\n", dev_err(&dev->dev, "Can't get %pOF property 'reg'\n",
dev->dev.of_node->full_name); dev->dev.of_node);
return -EFAULT; return -EFAULT;
} }
dev_info(&dev->dev, "Of-device full name %s\n", dev_info(&dev->dev, "Of-device full name %pOF\n",
dev->dev.of_node->full_name); dev->dev.of_node);
dev_info(&dev->dev, "Regs: %pR\n", &regs); dev_info(&dev->dev, "Regs: %pR\n", &regs);
rio_regs_win = ioremap(regs.start, resource_size(&regs)); rio_regs_win = ioremap(regs.start, resource_size(&regs));
@ -494,8 +494,8 @@ int fsl_rio_setup(struct platform_device *dev)
} }
rc = of_address_to_resource(rmu_node, 0, &rmu_regs); rc = of_address_to_resource(rmu_node, 0, &rmu_regs);
if (rc) { if (rc) {
dev_err(&dev->dev, "Can't get %s property 'reg'\n", dev_err(&dev->dev, "Can't get %pOF property 'reg'\n",
rmu_node->full_name); rmu_node);
goto err_rmu; goto err_rmu;
} }
rmu_regs_win = ioremap(rmu_regs.start, resource_size(&rmu_regs)); rmu_regs_win = ioremap(rmu_regs.start, resource_size(&rmu_regs));
@ -529,8 +529,8 @@ int fsl_rio_setup(struct platform_device *dev)
aw = of_n_addr_cells(np); aw = of_n_addr_cells(np);
dt_range = of_get_property(np, "reg", &rlen); dt_range = of_get_property(np, "reg", &rlen);
if (!dt_range) { if (!dt_range) {
pr_err("%s: unable to find 'reg' property\n", pr_err("%pOF: unable to find 'reg' property\n",
np->full_name); np);
rc = -ENOMEM; rc = -ENOMEM;
goto err_pw; goto err_pw;
} }
@ -557,8 +557,8 @@ int fsl_rio_setup(struct platform_device *dev)
aw = of_n_addr_cells(np); aw = of_n_addr_cells(np);
dt_range = of_get_property(np, "reg", &rlen); dt_range = of_get_property(np, "reg", &rlen);
if (!dt_range) { if (!dt_range) {
pr_err("%s: unable to find 'reg' property\n", pr_err("%pOF: unable to find 'reg' property\n",
np->full_name); np);
rc = -ENOMEM; rc = -ENOMEM;
goto err; goto err;
} }
@ -569,15 +569,15 @@ int fsl_rio_setup(struct platform_device *dev)
for_each_child_of_node(dev->dev.of_node, np) { for_each_child_of_node(dev->dev.of_node, np) {
port_index = of_get_property(np, "cell-index", NULL); port_index = of_get_property(np, "cell-index", NULL);
if (!port_index) { if (!port_index) {
dev_err(&dev->dev, "Can't get %s property 'cell-index'\n", dev_err(&dev->dev, "Can't get %pOF property 'cell-index'\n",
np->full_name); np);
continue; continue;
} }
dt_range = of_get_property(np, "ranges", &rlen); dt_range = of_get_property(np, "ranges", &rlen);
if (!dt_range) { if (!dt_range) {
dev_err(&dev->dev, "Can't get %s property 'ranges'\n", dev_err(&dev->dev, "Can't get %pOF property 'ranges'\n",
np->full_name); np);
continue; continue;
} }
@ -598,8 +598,8 @@ int fsl_rio_setup(struct platform_device *dev)
range_start = of_read_number(dt_range + aw, paw); range_start = of_read_number(dt_range + aw, paw);
range_size = of_read_number(dt_range + aw + paw, sw); range_size = of_read_number(dt_range + aw + paw, sw);
dev_info(&dev->dev, "%s: LAW start 0x%016llx, size 0x%016llx.\n", dev_info(&dev->dev, "%pOF: LAW start 0x%016llx, size 0x%016llx.\n",
np->full_name, range_start, range_size); np, range_start, range_size);
port = kzalloc(sizeof(struct rio_mport), GFP_KERNEL); port = kzalloc(sizeof(struct rio_mport), GFP_KERNEL);
if (!port) if (!port)
@ -757,8 +757,8 @@ err_rio_regs:
*/ */
static int fsl_of_rio_rpn_probe(struct platform_device *dev) static int fsl_of_rio_rpn_probe(struct platform_device *dev)
{ {
printk(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n", printk(KERN_INFO "Setting up RapidIO peer-to-peer network %pOF\n",
dev->dev.of_node->full_name); dev->dev.of_node);
return fsl_rio_setup(dev); return fsl_rio_setup(dev);
}; };

View File

@ -1074,8 +1074,8 @@ int fsl_rio_setup_rmu(struct rio_mport *mport, struct device_node *node)
priv = mport->priv; priv = mport->priv;
if (!node) { if (!node) {
dev_warn(priv->dev, "Can't get %s property 'fsl,rmu'\n", dev_warn(priv->dev, "Can't get %pOF property 'fsl,rmu'\n",
priv->dev->of_node->full_name); priv->dev->of_node);
return -EINVAL; return -EINVAL;
} }
@ -1086,8 +1086,8 @@ int fsl_rio_setup_rmu(struct rio_mport *mport, struct device_node *node)
aw = of_n_addr_cells(node); aw = of_n_addr_cells(node);
msg_addr = of_get_property(node, "reg", &mlen); msg_addr = of_get_property(node, "reg", &mlen);
if (!msg_addr) { if (!msg_addr) {
pr_err("%s: unable to find 'reg' property of message-unit\n", pr_err("%pOF: unable to find 'reg' property of message-unit\n",
node->full_name); node);
kfree(rmu); kfree(rmu);
return -ENOMEM; return -ENOMEM;
} }
@ -1098,8 +1098,8 @@ int fsl_rio_setup_rmu(struct rio_mport *mport, struct device_node *node)
rmu->txirq = irq_of_parse_and_map(node, 0); rmu->txirq = irq_of_parse_and_map(node, 0);
rmu->rxirq = irq_of_parse_and_map(node, 1); rmu->rxirq = irq_of_parse_and_map(node, 1);
printk(KERN_INFO "%s: txirq: %d, rxirq %d\n", printk(KERN_INFO "%pOF: txirq: %d, rxirq %d\n",
node->full_name, rmu->txirq, rmu->rxirq); node, rmu->txirq, rmu->rxirq);
priv->rmm_handle = rmu; priv->rmm_handle = rmu;

View File

@ -1650,8 +1650,8 @@ void __init mpic_init(struct mpic *mpic)
if (mpic->flags & MPIC_SECONDARY) { if (mpic->flags & MPIC_SECONDARY) {
int virq = irq_of_parse_and_map(mpic->node, 0); int virq = irq_of_parse_and_map(mpic->node, 0);
if (virq) { if (virq) {
printk(KERN_INFO "%s: hooking up to IRQ %d\n", printk(KERN_INFO "%pOF: hooking up to IRQ %d\n",
mpic->node->full_name, virq); mpic->node, virq);
irq_set_handler_data(virq, mpic); irq_set_handler_data(virq, mpic);
irq_set_chained_handler(virq, &mpic_cascade); irq_set_chained_handler(virq, &mpic_cascade);
} }

View File

@ -192,7 +192,7 @@ static int mpic_msgr_probe(struct platform_device *dev)
return -ENOMEM; return -ENOMEM;
} }
} }
dev_info(&dev->dev, "Of-device full name %s\n", np->full_name); dev_info(&dev->dev, "Of-device full name %pOF\n", np);
/* IO map the message register block. */ /* IO map the message register block. */
of_address_to_resource(np, 0, &rsrc); of_address_to_resource(np, 0, &rsrc);

View File

@ -60,7 +60,7 @@ static int mpic_msi_reserve_u3_hwirqs(struct mpic *mpic)
np = NULL; np = NULL;
while ((np = of_find_all_nodes(np))) { while ((np = of_find_all_nodes(np))) {
pr_debug("mpic: mapping hwirqs for %s\n", np->full_name); pr_debug("mpic: mapping hwirqs for %pOF\n", np);
index = 0; index = 0;
while (of_irq_parse_one(np, index++, &oirq) == 0) { while (of_irq_parse_one(np, index++, &oirq) == 0) {

View File

@ -466,8 +466,7 @@ static int timer_group_get_irq(struct device_node *np,
p = of_get_property(np, "fsl,available-ranges", &len); p = of_get_property(np, "fsl,available-ranges", &len);
if (p && len % (2 * sizeof(u32)) != 0) { if (p && len % (2 * sizeof(u32)) != 0) {
pr_err("%s: malformed available-ranges property.\n", pr_err("%pOF: malformed available-ranges property.\n", np);
np->full_name);
return -EINVAL; return -EINVAL;
} }
@ -484,8 +483,7 @@ static int timer_group_get_irq(struct device_node *np,
for (j = 0; j < count; j++) { for (j = 0; j < count; j++) {
irq = irq_of_parse_and_map(np, irq_index); irq = irq_of_parse_and_map(np, irq_index);
if (!irq) { if (!irq) {
pr_err("%s: irq parse and map failed.\n", pr_err("%pOF: irq parse and map failed.\n", np);
np->full_name);
return -EINVAL; return -EINVAL;
} }
@ -508,8 +506,7 @@ static void timer_group_init(struct device_node *np)
priv = kzalloc(sizeof(struct timer_group_priv), GFP_KERNEL); priv = kzalloc(sizeof(struct timer_group_priv), GFP_KERNEL);
if (!priv) { if (!priv) {
pr_err("%s: cannot allocate memory for group.\n", pr_err("%pOF: cannot allocate memory for group.\n", np);
np->full_name);
return; return;
} }
@ -518,29 +515,27 @@ static void timer_group_init(struct device_node *np)
priv->regs = of_iomap(np, i++); priv->regs = of_iomap(np, i++);
if (!priv->regs) { if (!priv->regs) {
pr_err("%s: cannot ioremap timer register address.\n", pr_err("%pOF: cannot ioremap timer register address.\n", np);
np->full_name);
goto out; goto out;
} }
if (priv->flags & FSL_GLOBAL_TIMER) { if (priv->flags & FSL_GLOBAL_TIMER) {
priv->group_tcr = of_iomap(np, i++); priv->group_tcr = of_iomap(np, i++);
if (!priv->group_tcr) { if (!priv->group_tcr) {
pr_err("%s: cannot ioremap tcr address.\n", pr_err("%pOF: cannot ioremap tcr address.\n", np);
np->full_name);
goto out; goto out;
} }
} }
ret = timer_group_get_freq(np, priv); ret = timer_group_get_freq(np, priv);
if (ret < 0) { if (ret < 0) {
pr_err("%s: cannot get timer frequency.\n", np->full_name); pr_err("%pOF: cannot get timer frequency.\n", np);
goto out; goto out;
} }
ret = timer_group_get_irq(np, priv); ret = timer_group_get_irq(np, priv);
if (ret < 0) { if (ret < 0) {
pr_err("%s: cannot get timer irqs.\n", np->full_name); pr_err("%pOF: cannot get timer irqs.\n", np);
goto out; goto out;
} }

View File

@ -86,13 +86,13 @@ int msi_bitmap_reserve_dt_hwirqs(struct msi_bitmap *bmp)
p = of_get_property(bmp->of_node, "msi-available-ranges", &len); p = of_get_property(bmp->of_node, "msi-available-ranges", &len);
if (!p) { if (!p) {
pr_debug("msi_bitmap: no msi-available-ranges property " \ pr_debug("msi_bitmap: no msi-available-ranges property " \
"found on %s\n", bmp->of_node->full_name); "found on %pOF\n", bmp->of_node);
return 1; return 1;
} }
if (len % (2 * sizeof(u32)) != 0) { if (len % (2 * sizeof(u32)) != 0) {
printk(KERN_WARNING "msi_bitmap: Malformed msi-available-ranges" printk(KERN_WARNING "msi_bitmap: Malformed msi-available-ranges"
" property on %s\n", bmp->of_node->full_name); " property on %pOF\n", bmp->of_node);
return -EINVAL; return -EINVAL;
} }

View File

@ -452,8 +452,8 @@ static int __init mv64x60_device_setup(void)
err = mv64x60_mpsc_device_setup(np, id++); err = mv64x60_mpsc_device_setup(np, id++);
if (err) if (err)
printk(KERN_ERR "Failed to initialize MV64x60 " printk(KERN_ERR "Failed to initialize MV64x60 "
"serial device %s: error %d.\n", "serial device %pOF: error %d.\n",
np->full_name, err); np, err);
} }
id = 0; id = 0;
@ -463,8 +463,8 @@ static int __init mv64x60_device_setup(void)
if (IS_ERR(pdev)) { if (IS_ERR(pdev)) {
err = PTR_ERR(pdev); err = PTR_ERR(pdev);
printk(KERN_ERR "Failed to initialize MV64x60 " printk(KERN_ERR "Failed to initialize MV64x60 "
"network block %s: error %d.\n", "network block %pOF: error %d.\n",
np->full_name, err); np, err);
continue; continue;
} }
for_each_child_of_node(np, np2) { for_each_child_of_node(np, np2) {
@ -474,9 +474,9 @@ static int __init mv64x60_device_setup(void)
err = mv64x60_eth_device_setup(np2, id2++, pdev); err = mv64x60_eth_device_setup(np2, id2++, pdev);
if (err) if (err)
printk(KERN_ERR "Failed to initialize " printk(KERN_ERR "Failed to initialize "
"MV64x60 network device %s: " "MV64x60 network device %pOF: "
"error %d.\n", "error %d.\n",
np2->full_name, err); np2, err);
} }
} }
@ -485,8 +485,8 @@ static int __init mv64x60_device_setup(void)
err = mv64x60_i2c_device_setup(np, id++); err = mv64x60_i2c_device_setup(np, id++);
if (err) if (err)
printk(KERN_ERR "Failed to initialize MV64x60 I2C " printk(KERN_ERR "Failed to initialize MV64x60 I2C "
"bus %s: error %d.\n", "bus %pOF: error %d.\n",
np->full_name, err); np, err);
} }
/* support up to one watchdog timer */ /* support up to one watchdog timer */
@ -494,8 +494,8 @@ static int __init mv64x60_device_setup(void)
if (np) { if (np) {
if ((err = mv64x60_wdt_device_setup(np, id))) if ((err = mv64x60_wdt_device_setup(np, id)))
printk(KERN_ERR "Failed to initialize MV64x60 " printk(KERN_ERR "Failed to initialize MV64x60 "
"Watchdog %s: error %d.\n", "Watchdog %pOF: error %d.\n",
np->full_name, err); np, err);
of_node_put(np); of_node_put(np);
} }

View File

@ -136,8 +136,8 @@ static int __init mv64x60_add_bridge(struct device_node *dev)
/* Get bus range if any */ /* Get bus range if any */
bus_range = of_get_property(dev, "bus-range", &len); bus_range = of_get_property(dev, "bus-range", &len);
if (bus_range == NULL || len < 2 * sizeof(int)) if (bus_range == NULL || len < 2 * sizeof(int))
printk(KERN_WARNING "Can't get bus-range for %s, assume" printk(KERN_WARNING "Can't get bus-range for %pOF, assume"
" bus 0\n", dev->full_name); " bus 0\n", dev);
hose = pcibios_alloc_controller(dev); hose = pcibios_alloc_controller(dev);
if (!hose) if (!hose)

View File

@ -38,21 +38,21 @@ void __init of_instantiate_rtc(void)
res = kmalloc(sizeof(*res), GFP_KERNEL); res = kmalloc(sizeof(*res), GFP_KERNEL);
if (!res) { if (!res) {
printk(KERN_ERR "OF RTC: Out of memory " printk(KERN_ERR "OF RTC: Out of memory "
"allocating resource structure for %s\n", "allocating resource structure for %pOF\n",
node->full_name); node);
continue; continue;
} }
err = of_address_to_resource(node, 0, res); err = of_address_to_resource(node, 0, res);
if (err) { if (err) {
printk(KERN_ERR "OF RTC: Error " printk(KERN_ERR "OF RTC: Error "
"translating resources for %s\n", "translating resources for %pOF\n",
node->full_name); node);
continue; continue;
} }
printk(KERN_INFO "OF_RTC: %s is a %s @ 0x%llx-0x%llx\n", printk(KERN_INFO "OF_RTC: %pOF is a %s @ 0x%llx-0x%llx\n",
node->full_name, plat_name, node, plat_name,
(unsigned long long)res->start, (unsigned long long)res->start,
(unsigned long long)res->end); (unsigned long long)res->end);
platform_device_register_simple(plat_name, -1, res, 1); platform_device_register_simple(plat_name, -1, res, 1);

View File

@ -194,12 +194,13 @@ static int scom_debug_init_one(struct dentry *root, struct device_node *dn,
ent->dn = of_node_get(dn); ent->dn = of_node_get(dn);
snprintf(ent->name, 16, "%08x", i); snprintf(ent->name, 16, "%08x", i);
ent->path.data = (void*) dn->full_name; ent->path.data = (void*)kasprintf(GFP_KERNEL, "%pOF", dn);
ent->path.size = strlen(dn->full_name); ent->path.size = strlen((char *)ent->path.data);
dir = debugfs_create_dir(ent->name, root); dir = debugfs_create_dir(ent->name, root);
if (!dir) { if (!dir) {
of_node_put(dn); of_node_put(dn);
kfree(ent->path.data);
kfree(ent); kfree(ent);
return -1; return -1;
} }

View File

@ -142,7 +142,6 @@ void __init simple_gpiochip_init(const char *compatible)
} }
continue; continue;
err: err:
pr_err("%s: registration failed, status %d\n", pr_err("%pOF: registration failed, status %d\n", np, ret);
np->full_name, ret);
} }
} }

View File

@ -213,8 +213,8 @@ int __init tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary)
/* Get bus range if any */ /* Get bus range if any */
bus_range = of_get_property(dev, "bus-range", &len); bus_range = of_get_property(dev, "bus-range", &len);
if (bus_range == NULL || len < 2 * sizeof(int)) { if (bus_range == NULL || len < 2 * sizeof(int)) {
printk(KERN_WARNING "Can't get bus-range for %s, assume" printk(KERN_WARNING "Can't get bus-range for %pOF, assume"
" bus 0\n", dev->full_name); " bus 0\n", dev);
} }
hose = pcibios_alloc_controller(dev); hose = pcibios_alloc_controller(dev);

View File

@ -551,7 +551,7 @@ bool __init xive_native_init(void)
pr_devel("not found !\n"); pr_devel("not found !\n");
return false; return false;
} }
pr_devel("Found %s\n", np->full_name); pr_devel("Found %pOF\n", np);
/* Resource 1 is HV window */ /* Resource 1 is HV window */
if (of_address_to_resource(np, 1, &r)) { if (of_address_to_resource(np, 1, &r)) {