Skip to contentSkip to conversation

nvmem: Convert to using %pOF instead of full_name

PATCH In review Rob Herring 2 participants 3 messages Jul 18, 2017 – Aug 10, 2017 NVMEM framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvmem: 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 Srinivas Kandagatla <[email protected]>
---
 drivers/nvmem/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/nvmem/core.c +2 -2
index 4c49285168fb..b0c60338296a 100644
@@ -794,8 +794,8 @@ struct nvmem_cell *of_nvmem_cell_get(struct device_node *np,
 
 	addr = of_get_property(cell_np, "reg", &len);
 	if (!addr || (len < 2 * sizeof(u32))) {
-		dev_err(&nvmem->dev, "nvmem: invalid reg on %s\n",
-			cell_np->full_name);
+		dev_err(&nvmem->dev, "nvmem: invalid reg on %pOF\n",
+			cell_np);
 		rval  = -EINVAL;
 		goto err_mem;
 	}

--
2.11.0

#1 lore raw
Quoted 9 lines · Rob Herring

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 Srinivas Kandagatla <[email protected]>
---
 drivers/nvmem/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Ping?

Quoted 17 lines
drivers/nvmem/core.c +2 -3
index 4c49285168fb..b0c60338296a 100644
@@ -794,8 +794,8 @@ struct nvmem_cell *of_nvmem_cell_get(struct device_node *np,
 
        addr = of_get_property(cell_np, "reg", &len);
        if (!addr || (len < 2 * sizeof(u32))) {
-               dev_err(&nvmem->dev, "nvmem: invalid reg on %s\n",
-                       cell_np->full_name);
+               dev_err(&nvmem->dev, "nvmem: invalid reg on %pOF\n",
+                       cell_np);
                rval  = -EINVAL;
                goto err_mem;
        }
--
Quoted 2 lines

2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 5 lines · Rob Herring
Quoted 4 lines · Rob Herring

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.

Quoted 7 lines
Quoted 5 lines
Cc Srinivas Kandagatla <[email protected]>
---
  drivers/nvmem/core.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Ping?

I have already sent this patch to Greg to queue up for next.

Thanks,
srini

Quoted 20 lines
Quoted 20 lines
drivers/nvmem/core.c +2 -3
index 4c49285168fb..b0c60338296a 100644
@@ -794,8 +794,8 @@ struct nvmem_cell *of_nvmem_cell_get(struct device_node *np,
 
         addr = of_get_property(cell_np, "reg", &len);
         if (!addr || (len < 2 * sizeof(u32))) {
-               dev_err(&nvmem->dev, "nvmem: invalid reg on %s\n",
-                       cell_np->full_name);
+               dev_err(&nvmem->dev, "nvmem: invalid reg on %pOF\n",
+                       cell_np);
                 rval  = -EINVAL;
                 goto err_mem;
         }
--

2.11.0