Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a412c85a authored by Rob Herring's avatar Rob Herring Committed by David S. Miller
Browse files

sparc: Convert to using %pOF instead of full_name



Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f3180e18
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -123,8 +123,7 @@ static int auxio_probe(struct platform_device *dev)
	if (!auxio_register)
		return -ENODEV;

	printk(KERN_INFO "AUXIO: Found device at %s\n",
	       dp->full_name);
	printk(KERN_INFO "AUXIO: Found device at %pOF\n", dp);

	if (auxio_devtype == AUXIO_TYPE_EBUS)
		auxio_set_led(AUXIO_LED_ON);
+4 −4
Original line number Diff line number Diff line
@@ -464,8 +464,8 @@ static int jbusmc_probe(struct platform_device *op)

	mc_list_add(&p->list);

	printk(KERN_INFO PFX "UltraSPARC-IIIi memory controller at %s\n",
	       op->dev.of_node->full_name);
	printk(KERN_INFO PFX "UltraSPARC-IIIi memory controller at %pOF\n",
	       op->dev.of_node);

	dev_set_drvdata(&op->dev, p);

@@ -747,8 +747,8 @@ static int chmc_probe(struct platform_device *op)

	mc_list_add(&p->list);

	printk(KERN_INFO PFX "UltraSPARC-III memory controller at %s [%s]\n",
	       dp->full_name,
	printk(KERN_INFO PFX "UltraSPARC-III memory controller at %pOF [%s]\n",
	       dp,
	       (p->layout_size ? "ACTIVE" : "INACTIVE"));

	dev_set_drvdata(&op->dev, p);
+3 −4
Original line number Diff line number Diff line
@@ -324,8 +324,8 @@ static void __init build_device_resources(struct platform_device *op,
		memset(r, 0, sizeof(*r));

		if (of_resource_verbose)
			printk("%s reg[%d] -> %llx\n",
			       op->dev.of_node->full_name, index,
			printk("%pOF reg[%d] -> %llx\n",
			       op->dev.of_node, index,
			       result);

		if (result != OF_BAD_ADDR) {
@@ -386,8 +386,7 @@ static struct platform_device * __init scan_one_device(struct device_node *dp,
	op->dev.dma_mask = &op->dev.coherent_dma_mask;

	if (of_device_register(op)) {
		printk("%s: Could not register of device.\n",
		       dp->full_name);
		printk("%pOF: Could not register of device.\n", dp);
		kfree(op);
		op = NULL;
	}
+17 −19
Original line number Diff line number Diff line
@@ -341,9 +341,9 @@ static void __init build_device_resources(struct platform_device *op,

	/* Prevent overrunning the op->resources[] array.  */
	if (num_reg > PROMREG_MAX) {
		printk(KERN_WARNING "%s: Too many regs (%d), "
		printk(KERN_WARNING "%pOF: Too many regs (%d), "
		       "limiting to %d.\n",
		       op->dev.of_node->full_name, num_reg, PROMREG_MAX);
		       op->dev.of_node, num_reg, PROMREG_MAX);
		num_reg = PROMREG_MAX;
	}

@@ -401,8 +401,8 @@ static void __init build_device_resources(struct platform_device *op,
		memset(r, 0, sizeof(*r));

		if (of_resource_verbose)
			printk("%s reg[%d] -> %llx\n",
			       op->dev.of_node->full_name, index,
			printk("%pOF reg[%d] -> %llx\n",
			       op->dev.of_node, index,
			       result);

		if (result != OF_BAD_ADDR) {
@@ -548,8 +548,8 @@ static unsigned int __init build_one_device_irq(struct platform_device *op,
					       dp->irq_trans->data);

		if (of_irq_verbose)
			printk("%s: direct translate %x --> %x\n",
			       dp->full_name, orig_irq, irq);
			printk("%pOF: direct translate %x --> %x\n",
			       dp, orig_irq, irq);

		goto out;
	}
@@ -579,10 +579,9 @@ static unsigned int __init build_one_device_irq(struct platform_device *op,
						   &irq);

			if (of_irq_verbose)
				printk("%s: Apply [%s:%x] imap --> [%s:%x]\n",
				       op->dev.of_node->full_name,
				       pp->full_name, this_orig_irq,
				       of_node_full_name(iret), irq);
				printk("%pOF: Apply [%pOF:%x] imap --> [%pOF:%x]\n",
				       op->dev.of_node,
				       pp, this_orig_irq, iret, irq);

			if (!iret)
				break;
@@ -597,10 +596,10 @@ static unsigned int __init build_one_device_irq(struct platform_device *op,

				irq = pci_irq_swizzle(dp, pp, irq);
				if (of_irq_verbose)
					printk("%s: PCI swizzle [%s] "
					printk("%pOF: PCI swizzle [%pOF] "
					       "%x --> %x\n",
					       op->dev.of_node->full_name,
					       pp->full_name, this_orig_irq,
					       op->dev.of_node,
					       pp, this_orig_irq,
					       irq);

			}
@@ -619,8 +618,8 @@ static unsigned int __init build_one_device_irq(struct platform_device *op,
	irq = ip->irq_trans->irq_build(op->dev.of_node, irq,
				       ip->irq_trans->data);
	if (of_irq_verbose)
		printk("%s: Apply IRQ trans [%s] %x --> %x\n",
		      op->dev.of_node->full_name, ip->full_name, orig_irq, irq);
		printk("%pOF: Apply IRQ trans [%pOF] %x --> %x\n",
		      op->dev.of_node, ip, orig_irq, irq);

out:
	nid = of_node_to_nid(dp);
@@ -656,9 +655,9 @@ static struct platform_device * __init scan_one_device(struct device_node *dp,

		/* Prevent overrunning the op->irqs[] array.  */
		if (op->archdata.num_irqs > PROMINTR_MAX) {
			printk(KERN_WARNING "%s: Too many irqs (%d), "
			printk(KERN_WARNING "%pOF: Too many irqs (%d), "
			       "limiting to %d.\n",
			       dp->full_name, op->archdata.num_irqs, PROMINTR_MAX);
			       dp, op->archdata.num_irqs, PROMINTR_MAX);
			op->archdata.num_irqs = PROMINTR_MAX;
		}
		memcpy(op->archdata.irqs, irq, op->archdata.num_irqs * 4);
@@ -680,8 +679,7 @@ static struct platform_device * __init scan_one_device(struct device_node *dp,
	op->dev.dma_mask = &op->dev.coherent_dma_mask;

	if (of_device_register(op)) {
		printk("%s: Could not register of device.\n",
		       dp->full_name);
		printk("%pOF: Could not register of device.\n", dp);
		kfree(op);
		op = NULL;
	}
+15 −16
Original line number Diff line number Diff line
@@ -431,13 +431,13 @@ static void of_scan_pci_bridge(struct pci_pbm_info *pbm,
	u64 size;

	if (ofpci_verbose)
		pci_info(dev, "of_scan_pci_bridge(%s)\n", node->full_name);
		pci_info(dev, "of_scan_pci_bridge(%pOF)\n", node);

	/* parse bus-range property */
	busrange = of_get_property(node, "bus-range", &len);
	if (busrange == NULL || len != 8) {
		pci_info(dev, "Can't get bus-range for PCI-PCI bridge %s\n",
		       node->full_name);
		pci_info(dev, "Can't get bus-range for PCI-PCI bridge %pOF\n",
		       node);
		return;
	}

@@ -455,8 +455,8 @@ static void of_scan_pci_bridge(struct pci_pbm_info *pbm,

	bus = pci_add_new_bus(dev->bus, dev, busrange[0]);
	if (!bus) {
		pci_err(dev, "Failed to create pci bus for %s\n",
			node->full_name);
		pci_err(dev, "Failed to create pci bus for %pOF\n",
			node);
		return;
	}

@@ -512,13 +512,13 @@ static void of_scan_pci_bridge(struct pci_pbm_info *pbm,
			res = bus->resource[0];
			if (res->flags) {
				pci_err(dev, "ignoring extra I/O range"
					" for bridge %s\n", node->full_name);
					" for bridge %pOF\n", node);
				continue;
			}
		} else {
			if (i >= PCI_NUM_RESOURCES - PCI_BRIDGE_RESOURCES) {
				pci_err(dev, "too many memory ranges"
					" for bridge %s\n", node->full_name);
					" for bridge %pOF\n", node);
				continue;
			}
			res = bus->resource[i];
@@ -554,14 +554,14 @@ static void pci_of_scan_bus(struct pci_pbm_info *pbm,
	struct pci_dev *dev;

	if (ofpci_verbose)
		pci_info(bus, "scan_bus[%s] bus no %d\n",
			 node->full_name, bus->number);
		pci_info(bus, "scan_bus[%pOF] bus no %d\n",
			 node, bus->number);

	child = NULL;
	prev_devfn = -1;
	while ((child = of_get_next_child(node, child)) != NULL) {
		if (ofpci_verbose)
			pci_info(bus, "  * %s\n", child->full_name);
			pci_info(bus, "  * %pOF\n", child);
		reg = of_get_property(child, "reg", &reglen);
		if (reg == NULL || reglen < 20)
			continue;
@@ -598,7 +598,7 @@ show_pciobppath_attr(struct device * dev, struct device_attribute * attr, char *
	pdev = to_pci_dev(dev);
	dp = pdev->dev.of_node;

	return snprintf (buf, PAGE_SIZE, "%s\n", dp->full_name);
	return snprintf (buf, PAGE_SIZE, "%pOF\n", dp);
}

static DEVICE_ATTR(obppath, S_IRUSR | S_IRGRP | S_IROTH, show_pciobppath_attr, NULL);
@@ -698,7 +698,7 @@ struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm,
	struct device_node *node = pbm->op->dev.of_node;
	struct pci_bus *bus;

	printk("PCI: Scanning PBM %s\n", node->full_name);
	printk("PCI: Scanning PBM %pOF\n", node);

	pci_add_resource_offset(&resources, &pbm->io_space,
				pbm->io_offset);
@@ -714,8 +714,7 @@ struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm,
	bus = pci_create_root_bus(parent, pbm->pci_first_busno, pbm->pci_ops,
				  pbm, &resources);
	if (!bus) {
		printk(KERN_ERR "Failed to create bus for %s\n",
		       node->full_name);
		printk(KERN_ERR "Failed to create bus for %pOF\n", node);
		pci_free_resource_list(&resources);
		return NULL;
	}
@@ -1111,8 +1110,8 @@ static void pci_bus_slot_names(struct device_node *node, struct pci_bus *bus)
	sp = prop->names;

	if (ofpci_verbose)
		pci_info(bus, "Making slots for [%s] mask[0x%02x]\n",
			 node->full_name, mask);
		pci_info(bus, "Making slots for [%pOF] mask[0x%02x]\n",
			 node, mask);

	i = 0;
	while (mask) {
Loading