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:

committed by
Michael Ellerman

parent
bcf21e3a97
commit
b7c670d673
@@ -2658,25 +2658,25 @@ static void __init probe_one_macio(const char *name, const char *compat, int typ
|
||||
|
||||
if (i >= MAX_MACIO_CHIPS) {
|
||||
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;
|
||||
}
|
||||
addrp = of_get_pci_address(node, 0, &size, NULL);
|
||||
if (addrp == NULL) {
|
||||
printk(KERN_ERR "pmac_feature: %s: can't find base !\n",
|
||||
node->full_name);
|
||||
printk(KERN_ERR "pmac_feature: %pOF: can't find base !\n",
|
||||
node);
|
||||
return;
|
||||
}
|
||||
addr = of_translate_address(node, addrp);
|
||||
if (addr == 0) {
|
||||
printk(KERN_ERR "pmac_feature: %s, can't translate base !\n",
|
||||
node->full_name);
|
||||
printk(KERN_ERR "pmac_feature: %pOF, can't translate base !\n",
|
||||
node);
|
||||
return;
|
||||
}
|
||||
base = ioremap(addr, (unsigned long)size);
|
||||
if (!base) {
|
||||
printk(KERN_ERR "pmac_feature: %s, can't map mac-io chip !\n",
|
||||
node->full_name);
|
||||
printk(KERN_ERR "pmac_feature: %pOF, can't map mac-io chip !\n",
|
||||
node);
|
||||
return;
|
||||
}
|
||||
if (type == macio_keylargo || type == macio_keylargo2) {
|
||||
|
@@ -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);
|
||||
if (host == NULL) {
|
||||
printk(KERN_ERR "low_i2c: Can't allocate host for %s\n",
|
||||
np->full_name);
|
||||
printk(KERN_ERR "low_i2c: Can't allocate host for %pOF\n",
|
||||
np);
|
||||
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);
|
||||
if (addrp == NULL) {
|
||||
printk(KERN_ERR "low_i2c: Can't find address for %s\n",
|
||||
np->full_name);
|
||||
printk(KERN_ERR "low_i2c: Can't find address for %pOF\n",
|
||||
np);
|
||||
kfree(host);
|
||||
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);
|
||||
if (!host->irq)
|
||||
printk(KERN_WARNING
|
||||
"low_i2c: Failed to map interrupt for %s\n",
|
||||
np->full_name);
|
||||
"low_i2c: Failed to map interrupt for %pOF\n",
|
||||
np);
|
||||
|
||||
host->base = ioremap((*addrp), 0x1000);
|
||||
if (host->base == NULL) {
|
||||
printk(KERN_ERR "low_i2c: Can't map registers for %s\n",
|
||||
np->full_name);
|
||||
printk(KERN_ERR "low_i2c: Can't map registers for %pOF\n",
|
||||
np);
|
||||
kfree(host);
|
||||
return NULL;
|
||||
}
|
||||
@@ -560,8 +560,8 @@ static struct pmac_i2c_host_kw *__init kw_i2c_host_init(struct device_node *np)
|
||||
"keywest i2c", host))
|
||||
host->irq = 0;
|
||||
|
||||
printk(KERN_INFO "KeyWest i2c @0x%08x irq %d %s\n",
|
||||
*addrp, host->irq, np->full_name);
|
||||
printk(KERN_INFO "KeyWest i2c @0x%08x irq %d %pOF\n",
|
||||
*addrp, host->irq, np);
|
||||
|
||||
return host;
|
||||
}
|
||||
@@ -798,7 +798,7 @@ static void __init pmu_i2c_probe(void)
|
||||
if (busnode == NULL)
|
||||
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"
|
||||
@@ -913,7 +913,7 @@ static void __init smu_i2c_probe(void)
|
||||
if (controller == NULL)
|
||||
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
|
||||
* 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;
|
||||
list_add(&bus->link, &pmac_i2c_busses);
|
||||
|
||||
printk(KERN_INFO " channel %x bus %s\n",
|
||||
bus->channel, busnode->full_name);
|
||||
printk(KERN_INFO " channel %x bus %pOF\n",
|
||||
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) {
|
||||
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;
|
||||
}
|
||||
bus->mode = mode;
|
||||
@@ -1146,8 +1146,8 @@ int pmac_i2c_xfer(struct pmac_i2c_bus *bus, u8 addrdir, int subsize,
|
||||
WARN_ON(!bus->opened);
|
||||
|
||||
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,
|
||||
subaddr, len, bus->busnode->full_name);
|
||||
" %d bytes, bus %pOF\n", bus->channel, addrdir, bus->mode, subsize,
|
||||
subaddr, len, bus->busnode);
|
||||
|
||||
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);
|
||||
if (bus == NULL) {
|
||||
printk(KERN_ERR "low_i2c: Can't find bus for %s (pfunc)\n",
|
||||
func->node->full_name);
|
||||
printk(KERN_ERR "low_i2c: Can't find bus for %pOF (pfunc)\n",
|
||||
func->node);
|
||||
return NULL;
|
||||
}
|
||||
if (pmac_i2c_open(bus, 0)) {
|
||||
printk(KERN_ERR "low_i2c: Can't open i2c bus for %s (pfunc)\n",
|
||||
func->node->full_name);
|
||||
printk(KERN_ERR "low_i2c: Can't open i2c bus for %pOF (pfunc)\n",
|
||||
func->node);
|
||||
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)
|
||||
{
|
||||
DBG("dev_create(%s)\n", np->full_name);
|
||||
DBG("dev_create(%pOF)\n", np);
|
||||
|
||||
pmf_register_driver(np, &pmac_i2c_pfunc_handlers,
|
||||
(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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@@ -783,7 +783,7 @@ static int __init pmac_add_bridge(struct device_node *dev)
|
||||
const int *bus_range;
|
||||
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 */
|
||||
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 */
|
||||
bus_range = of_get_property(dev, "bus-range", &len);
|
||||
if (bus_range == NULL || len < 2 * sizeof(int)) {
|
||||
printk(KERN_WARNING "Can't get bus-range for %s, assume"
|
||||
" bus 0\n", dev->full_name);
|
||||
printk(KERN_WARNING "Can't get bus-range for %pOF, assume"
|
||||
" bus 0\n", dev);
|
||||
}
|
||||
|
||||
hose = pcibios_alloc_controller(dev);
|
||||
|
@@ -54,8 +54,8 @@ static int macio_do_gpio_write(PMF_STD_ARGS, u8 value, u8 mask)
|
||||
raw_spin_lock_irqsave(&feature_lock, flags);
|
||||
tmp = readb(addr);
|
||||
tmp = (tmp & ~mask) | (value & mask);
|
||||
DBG("Do write 0x%02x to GPIO %s (%p)\n",
|
||||
tmp, func->node->full_name, addr);
|
||||
DBG("Do write 0x%02x to GPIO %pOF (%p)\n",
|
||||
tmp, func->node, addr);
|
||||
writeb(tmp, addr);
|
||||
raw_spin_unlock_irqrestore(&feature_lock, flags);
|
||||
|
||||
@@ -107,8 +107,8 @@ static void macio_gpio_init_one(struct macio_chip *macio)
|
||||
if (gparent == NULL)
|
||||
return;
|
||||
|
||||
DBG("Installing GPIO functions for macio %s\n",
|
||||
macio->of_node->full_name);
|
||||
DBG("Installing GPIO functions for macio %pOF\n",
|
||||
macio->of_node);
|
||||
|
||||
/*
|
||||
* 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);
|
||||
}
|
||||
|
||||
DBG("Calling initial GPIO functions for macio %s\n",
|
||||
macio->of_node->full_name);
|
||||
DBG("Calling initial GPIO functions for macio %pOF\n",
|
||||
macio->of_node);
|
||||
|
||||
/* And now we run all the init ones */
|
||||
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)
|
||||
{
|
||||
DBG("Installing MMIO functions for macio %s\n",
|
||||
macio->of_node->full_name);
|
||||
DBG("Installing MMIO functions for macio %pOF\n",
|
||||
macio->of_node);
|
||||
|
||||
pmf_register_driver(macio->of_node, &macio_mmio_handlers, macio);
|
||||
}
|
||||
@@ -298,8 +298,8 @@ static void uninorth_install_pfunc(void)
|
||||
{
|
||||
struct device_node *np;
|
||||
|
||||
DBG("Installing functions for UniN %s\n",
|
||||
uninorth_node->full_name);
|
||||
DBG("Installing functions for UniN %pOF\n",
|
||||
uninorth_node);
|
||||
|
||||
/*
|
||||
* Install handlers for the bridge itself
|
||||
@@ -317,8 +317,8 @@ static void uninorth_install_pfunc(void)
|
||||
break;
|
||||
}
|
||||
if (unin_hwclock) {
|
||||
DBG("Installing functions for UniN clock %s\n",
|
||||
unin_hwclock->full_name);
|
||||
DBG("Installing functions for UniN clock %pOF\n",
|
||||
unin_hwclock);
|
||||
pmf_register_driver(unin_hwclock, &unin_mmio_handlers, NULL);
|
||||
pmf_do_functions(unin_hwclock, NULL, 0, PMF_FLAGS_ON_INIT,
|
||||
NULL);
|
||||
|
@@ -708,7 +708,7 @@ int pmf_register_driver(struct device_node *np,
|
||||
if (handlers == NULL)
|
||||
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);
|
||||
dev = pmf_find_device(np);
|
||||
@@ -781,7 +781,7 @@ void pmf_unregister_driver(struct device_node *np)
|
||||
struct pmf_device *dev;
|
||||
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);
|
||||
dev = pmf_find_device(np);
|
||||
@@ -940,7 +940,7 @@ int pmf_call_one(struct pmf_function *func, struct pmf_args *args)
|
||||
void *instdata = NULL;
|
||||
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)
|
||||
instdata = dev->handlers->begin(func, args);
|
||||
|
@@ -364,8 +364,8 @@ static void __init pmac_pic_probe_oldstyle(void)
|
||||
(addr + 0x10);
|
||||
of_node_put(master);
|
||||
|
||||
printk(KERN_INFO "irq: Found primary Apple PIC %s for %d irqs\n",
|
||||
master->full_name, max_real_irqs);
|
||||
printk(KERN_INFO "irq: Found primary Apple PIC %pOF for %d irqs\n",
|
||||
master, max_real_irqs);
|
||||
|
||||
/* Map interrupts of cascaded controller */
|
||||
if (slave && !of_address_to_resource(slave, 0, &r)) {
|
||||
@@ -378,8 +378,8 @@ static void __init pmac_pic_probe_oldstyle(void)
|
||||
(addr + 0x10);
|
||||
pmac_irq_cascade = irq_of_parse_and_map(slave, 0);
|
||||
|
||||
printk(KERN_INFO "irq: Found slave Apple PIC %s for %d irqs"
|
||||
" cascade: %d\n", slave->full_name,
|
||||
printk(KERN_INFO "irq: Found slave Apple PIC %pOF for %d irqs"
|
||||
" cascade: %d\n", slave,
|
||||
max_irqs - max_real_irqs, pmac_irq_cascade);
|
||||
}
|
||||
of_node_put(slave);
|
||||
|
@@ -556,7 +556,7 @@ static int __init check_pmac_serial_console(void)
|
||||
pr_debug(" can't find stdout package %s !\n", name);
|
||||
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);
|
||||
if (!name) {
|
||||
|
Reference in New Issue
Block a user