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

Commit b7c670d6 authored by Rob Herring's avatar Rob Herring Committed by Michael Ellerman
Browse files

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: default avatarRob 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: default avatarTyrel Datwyler <tyreld@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent bcf21e3a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -253,7 +253,7 @@ int __init btext_find_display(int allow_nonstdout)

	for_each_node_by_type(np, "display") {
		if (of_get_property(np, "linux,opened", NULL)) {
			printk("trying %s ...\n", np->full_name);
			printk("trying %pOF ...\n", np);
			rc = btext_initialize(np);
			printk("result: %d\n", rc);
		}
+16 −18
Original line number Diff line number Diff line
@@ -167,10 +167,10 @@ static void release_cache_debugcheck(struct cache *cache)

	list_for_each_entry(iter, &cache_list, list)
		WARN_ONCE(iter->next_local == cache,
			  "cache for %s(%s) refers to cache for %s(%s)\n",
			  iter->ofnode->full_name,
			  "cache for %pOF(%s) refers to cache for %pOF(%s)\n",
			  iter->ofnode,
			  cache_type_string(iter),
			  cache->ofnode->full_name,
			  cache->ofnode,
			  cache_type_string(cache));
}

@@ -179,8 +179,8 @@ static void release_cache(struct cache *cache)
	if (!cache)
		return;

	pr_debug("freeing L%d %s cache for %s\n", cache->level,
		 cache_type_string(cache), cache->ofnode->full_name);
	pr_debug("freeing L%d %s cache for %pOF\n", cache->level,
		 cache_type_string(cache), cache->ofnode);

	release_cache_debugcheck(cache);
	list_del(&cache->list);
@@ -194,8 +194,8 @@ static void cache_cpu_set(struct cache *cache, int cpu)

	while (next) {
		WARN_ONCE(cpumask_test_cpu(cpu, &next->shared_cpu_map),
			  "CPU %i already accounted in %s(%s)\n",
			  cpu, next->ofnode->full_name,
			  "CPU %i already accounted in %pOF(%s)\n",
			  cpu, next->ofnode,
			  cache_type_string(next));
		cpumask_set_cpu(cpu, &next->shared_cpu_map);
		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)
{
	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);
}
@@ -365,8 +365,8 @@ static struct cache *cache_do_one_devnode_split(struct device_node *node,
{
	struct cache *dcache, *icache;

	pr_debug("creating L%d dcache and icache for %s\n", level,
		 node->full_name);
	pr_debug("creating L%d dcache and icache for %pOF\n", level,
		 node);

	dcache = new_cache(CACHE_TYPE_DATA, 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)
{
	const char *cache_name;
	const char *cache_type;
	struct cache *cache;
	char *buf;
@@ -690,7 +689,6 @@ static void cacheinfo_create_index_opt_attrs(struct cache_index_dir *dir)
		return;

	cache = dir->cache;
	cache_name = cache->ofnode->full_name;
	cache_type = cache_type_string(cache);

	/* 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);
		if (rc <= 0) {
			pr_debug("not creating %s attribute for "
				 "%s(%s) (rc = %zd)\n",
				 attr->attr.name, cache_name,
				 "%pOF(%s) (rc = %zd)\n",
				 attr->attr.name, cache->ofnode,
				 cache_type, rc);
			continue;
		}
		if (sysfs_create_file(&dir->kobj, &attr->attr))
			pr_debug("could not create %s attribute for %s(%s)\n",
				 attr->attr.name, cache_name, cache_type);
			pr_debug("could not create %s attribute for %pOF(%s)\n",
				 attr->attr.name, cache->ofnode, cache_type);
	}

	kfree(buf);
@@ -831,8 +829,8 @@ static void cache_cpu_clear(struct cache *cache, int cpu)
		struct cache *next = cache->next_local;

		WARN_ONCE(!cpumask_test_cpu(cpu, &cache->shared_cpu_map),
			  "CPU %i not accounted in %s(%s)\n",
			  cpu, cache->ofnode->full_name,
			  "CPU %i not accounted in %pOF(%s)\n",
			  cpu, cache->ofnode,
			  cache_type_string(cache));

		cpumask_clear_cpu(cpu, &cache->shared_cpu_map);
+2 −2
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ void iowa_register_bus(struct pci_controller *phb, struct ppc_pci_io *ops,

	if (iowa_bus_count >= IOWA_MAX_BUS) {
		pr_err("IOWA:Too many pci bridges, "
		       "workarounds disabled for %s\n", np->full_name);
		       "workarounds disabled for %pOF\n", np);
		return;
	}

@@ -208,6 +208,6 @@ void iowa_register_bus(struct pci_controller *phb, struct ppc_pci_io *ops,

	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);
}
+16 −16
Original line number Diff line number Diff line
@@ -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 */
	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);
	if (of_property_read_u32(np, "#address-cells", &na) ||
	    of_property_read_u32(np, "#size-cells", &ns)) {
		pr_warn("ISA: Non-PCI bridge %s is missing address format\n",
			np->full_name);
		pr_warn("ISA: Non-PCI bridge %pOF is missing address format\n",
			np);
		return;
	}

	/* Check it's a supported address format */
	if (na != 2 || ns != 1) {
		pr_warn("ISA: Non-PCI bridge %s has unsupported address format\n",
			np->full_name);
		pr_warn("ISA: Non-PCI bridge %pOF has unsupported address format\n",
			np);
		return;
	}
	rs = na + ns + pna;
@@ -203,8 +203,8 @@ void __init isa_bridge_init_non_pci(struct device_node *np)
	/* Grab the ranges property */
	ranges = of_get_property(np, "ranges", &rlen);
	if (ranges == NULL || rlen < rs) {
		pr_warn("ISA: Non-PCI bridge %s has absent or invalid ranges\n",
			np->full_name);
		pr_warn("ISA: Non-PCI bridge %pOF has absent or invalid ranges\n",
			np);
		return;
	}

@@ -220,8 +220,8 @@ void __init isa_bridge_init_non_pci(struct device_node *np)

	/* Got something ? */
	if (!size || !pbasep) {
		pr_warn("ISA: Non-PCI bridge %s has no usable IO range\n",
			np->full_name);
		pr_warn("ISA: Non-PCI bridge %pOF has no usable IO range\n",
			np);
		return;
	}

@@ -233,15 +233,15 @@ void __init isa_bridge_init_non_pci(struct device_node *np)
	/* Map pbase */
	pbase = of_translate_address(np, pbasep);
	if (pbase == OF_BAD_ADDR) {
		pr_warn("ISA: Non-PCI bridge %s failed to translate IO base\n",
			np->full_name);
		pr_warn("ISA: Non-PCI bridge %pOF failed to translate IO base\n",
			np);
		return;
	}

	/* We need page alignment */
	if ((cbase & ~PAGE_MASK) || (pbase & ~PAGE_MASK)) {
		pr_warn("ISA: Non-PCI bridge %s has non aligned IO range\n",
			np->full_name);
		pr_warn("ISA: Non-PCI bridge %pOF has non aligned IO range\n",
			np);
		return;
	}

@@ -255,7 +255,7 @@ void __init isa_bridge_init_non_pci(struct device_node *np)
	__ioremap_at(pbase, (void *)ISA_IO_BASE,
		     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 */
	isa_io_base = ISA_IO_BASE;

	pr_debug("ISA bridge (late) is %s on %s\n",
		 devnode->full_name, pci_name(pdev));
	pr_debug("ISA bridge (late) is %pOF on %s\n",
		 devnode, pci_name(pdev));
}

/**
+6 −6
Original line number Diff line number Diff line
@@ -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;
	}

	printk(KERN_DEBUG "Found legacy serial port %d for %s\n",
	       index, np->full_name);
	printk(KERN_DEBUG "Found legacy serial port %d for %pOF\n",
	       index, np);
	printk(KERN_DEBUG "  %s=%llx, taddr=%llx, irq=%lx, clk=%d, speed=%d\n",
	       (iotype == UPIO_PORT) ? "port" : "mem",
	       (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;
	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 */
	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;
	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
	 * 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) {
		stdout = of_find_node_by_path(path);
		if (stdout)
			DBG("stdout is %s\n", stdout->full_name);
			DBG("stdout is %pOF\n", stdout);
	} else {
		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);
		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);
	if (!name) {
Loading