Commit b2e870f2 authored by Rob Herring's avatar Rob Herring Committed by Herbert Xu

crypto: n2 - 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: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 297b9ceb
...@@ -1730,8 +1730,8 @@ static int spu_mdesc_walk_arcs(struct mdesc_handle *mdesc, ...@@ -1730,8 +1730,8 @@ static int spu_mdesc_walk_arcs(struct mdesc_handle *mdesc,
continue; continue;
id = mdesc_get_property(mdesc, tgt, "id", NULL); id = mdesc_get_property(mdesc, tgt, "id", NULL);
if (table[*id] != NULL) { if (table[*id] != NULL) {
dev_err(&dev->dev, "%s: SPU cpu slot already set.\n", dev_err(&dev->dev, "%pOF: SPU cpu slot already set.\n",
dev->dev.of_node->full_name); dev->dev.of_node);
return -EINVAL; return -EINVAL;
} }
cpumask_set_cpu(*id, &p->sharing); cpumask_set_cpu(*id, &p->sharing);
...@@ -1751,8 +1751,8 @@ static int handle_exec_unit(struct spu_mdesc_info *ip, struct list_head *list, ...@@ -1751,8 +1751,8 @@ static int handle_exec_unit(struct spu_mdesc_info *ip, struct list_head *list,
p = kzalloc(sizeof(struct spu_queue), GFP_KERNEL); p = kzalloc(sizeof(struct spu_queue), GFP_KERNEL);
if (!p) { if (!p) {
dev_err(&dev->dev, "%s: Could not allocate SPU queue.\n", dev_err(&dev->dev, "%pOF: Could not allocate SPU queue.\n",
dev->dev.of_node->full_name); dev->dev.of_node);
return -ENOMEM; return -ENOMEM;
} }
...@@ -1981,41 +1981,39 @@ static void n2_spu_driver_version(void) ...@@ -1981,41 +1981,39 @@ static void n2_spu_driver_version(void)
static int n2_crypto_probe(struct platform_device *dev) static int n2_crypto_probe(struct platform_device *dev)
{ {
struct mdesc_handle *mdesc; struct mdesc_handle *mdesc;
const char *full_name;
struct n2_crypto *np; struct n2_crypto *np;
int err; int err;
n2_spu_driver_version(); n2_spu_driver_version();
full_name = dev->dev.of_node->full_name; pr_info("Found N2CP at %pOF\n", dev->dev.of_node);
pr_info("Found N2CP at %s\n", full_name);
np = alloc_n2cp(); np = alloc_n2cp();
if (!np) { if (!np) {
dev_err(&dev->dev, "%s: Unable to allocate n2cp.\n", dev_err(&dev->dev, "%pOF: Unable to allocate n2cp.\n",
full_name); dev->dev.of_node);
return -ENOMEM; return -ENOMEM;
} }
err = grab_global_resources(); err = grab_global_resources();
if (err) { if (err) {
dev_err(&dev->dev, "%s: Unable to grab " dev_err(&dev->dev, "%pOF: Unable to grab global resources.\n",
"global resources.\n", full_name); dev->dev.of_node);
goto out_free_n2cp; goto out_free_n2cp;
} }
mdesc = mdesc_grab(); mdesc = mdesc_grab();
if (!mdesc) { if (!mdesc) {
dev_err(&dev->dev, "%s: Unable to grab MDESC.\n", dev_err(&dev->dev, "%pOF: Unable to grab MDESC.\n",
full_name); dev->dev.of_node);
err = -ENODEV; err = -ENODEV;
goto out_free_global; goto out_free_global;
} }
err = grab_mdesc_irq_props(mdesc, dev, &np->cwq_info, "n2cp"); err = grab_mdesc_irq_props(mdesc, dev, &np->cwq_info, "n2cp");
if (err) { if (err) {
dev_err(&dev->dev, "%s: Unable to grab IRQ props.\n", dev_err(&dev->dev, "%pOF: Unable to grab IRQ props.\n",
full_name); dev->dev.of_node);
mdesc_release(mdesc); mdesc_release(mdesc);
goto out_free_global; goto out_free_global;
} }
...@@ -2026,15 +2024,15 @@ static int n2_crypto_probe(struct platform_device *dev) ...@@ -2026,15 +2024,15 @@ static int n2_crypto_probe(struct platform_device *dev)
mdesc_release(mdesc); mdesc_release(mdesc);
if (err) { if (err) {
dev_err(&dev->dev, "%s: CWQ MDESC scan failed.\n", dev_err(&dev->dev, "%pOF: CWQ MDESC scan failed.\n",
full_name); dev->dev.of_node);
goto out_free_global; goto out_free_global;
} }
err = n2_register_algs(); err = n2_register_algs();
if (err) { if (err) {
dev_err(&dev->dev, "%s: Unable to register algorithms.\n", dev_err(&dev->dev, "%pOF: Unable to register algorithms.\n",
full_name); dev->dev.of_node);
goto out_free_spu_list; goto out_free_spu_list;
} }
...@@ -2092,42 +2090,40 @@ static void free_ncp(struct n2_mau *mp) ...@@ -2092,42 +2090,40 @@ static void free_ncp(struct n2_mau *mp)
static int n2_mau_probe(struct platform_device *dev) static int n2_mau_probe(struct platform_device *dev)
{ {
struct mdesc_handle *mdesc; struct mdesc_handle *mdesc;
const char *full_name;
struct n2_mau *mp; struct n2_mau *mp;
int err; int err;
n2_spu_driver_version(); n2_spu_driver_version();
full_name = dev->dev.of_node->full_name; pr_info("Found NCP at %pOF\n", dev->dev.of_node);
pr_info("Found NCP at %s\n", full_name);
mp = alloc_ncp(); mp = alloc_ncp();
if (!mp) { if (!mp) {
dev_err(&dev->dev, "%s: Unable to allocate ncp.\n", dev_err(&dev->dev, "%pOF: Unable to allocate ncp.\n",
full_name); dev->dev.of_node);
return -ENOMEM; return -ENOMEM;
} }
err = grab_global_resources(); err = grab_global_resources();
if (err) { if (err) {
dev_err(&dev->dev, "%s: Unable to grab " dev_err(&dev->dev, "%pOF: Unable to grab global resources.\n",
"global resources.\n", full_name); dev->dev.of_node);
goto out_free_ncp; goto out_free_ncp;
} }
mdesc = mdesc_grab(); mdesc = mdesc_grab();
if (!mdesc) { if (!mdesc) {
dev_err(&dev->dev, "%s: Unable to grab MDESC.\n", dev_err(&dev->dev, "%pOF: Unable to grab MDESC.\n",
full_name); dev->dev.of_node);
err = -ENODEV; err = -ENODEV;
goto out_free_global; goto out_free_global;
} }
err = grab_mdesc_irq_props(mdesc, dev, &mp->mau_info, "ncp"); err = grab_mdesc_irq_props(mdesc, dev, &mp->mau_info, "ncp");
if (err) { if (err) {
dev_err(&dev->dev, "%s: Unable to grab IRQ props.\n", dev_err(&dev->dev, "%pOF: Unable to grab IRQ props.\n",
full_name); dev->dev.of_node);
mdesc_release(mdesc); mdesc_release(mdesc);
goto out_free_global; goto out_free_global;
} }
...@@ -2138,8 +2134,8 @@ static int n2_mau_probe(struct platform_device *dev) ...@@ -2138,8 +2134,8 @@ static int n2_mau_probe(struct platform_device *dev)
mdesc_release(mdesc); mdesc_release(mdesc);
if (err) { if (err) {
dev_err(&dev->dev, "%s: MAU MDESC scan failed.\n", dev_err(&dev->dev, "%pOF: MAU MDESC scan failed.\n",
full_name); dev->dev.of_node);
goto out_free_global; goto out_free_global;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment