From patchwork Tue Jul 18 21:42:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 108231 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp6490758qge; Tue, 18 Jul 2017 14:57:40 -0700 (PDT) X-Received: by 10.99.116.84 with SMTP id e20mr3834788pgn.62.1500415060586; Tue, 18 Jul 2017 14:57:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500415060; cv=none; d=google.com; s=arc-20160816; b=g6JVqkZZZCj8aqWbWVJOeDhuYDEAAf2o32NZCiUNF3mCvxKAi1pg39wsNYIIZVS7gy mXzJ89j/cv94vtPkDtqTxhX9tyV3Ia7OKMY10HeyYi+S/JXLBbvXAE5UNe15cddEZ/Sq NvQgl5xtK45oOWWcSOeICeD7kr+bX38ZieRCXzXQxTdTfE2tDkp2C5TRoe69bn+IDlLy pYdwwSVktZg+sWqy13ln9qeOARJTlf6C2ZS2b5NMpQ32HauUUPMXtV3NX0m/zjYY1Lao UUb6v90QbTNYjVoLdj4M97/ryZiIauY4yOiy1MvdgaX02DWI6dtzU4CwqD2F6yWMRu9H 3nAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=PyJj0xfAyDQ1XRL4LQ3syG/8aeVC2iVFEWPhIPtXI5U=; b=HaVL4dAg3gy9On7JRIUb8hl+f6IH5QXECM0TfezMlZVrxvGJK28EaJGDLu/ntX0bP1 GqEmCRKRhklwXQNil/ogS3Pi9aBx1k01p+aTOrObBLM3T+m8i6w/AHanEdF/A02aMuML WHvqrsa+L9ua20+y/4d6QsGkJyb+RR9W74uvSptW9GsEWpXNANF6ly+pH1u/BwEgPR1c fc3pxDgjt97xLkG0SOsQz/MV374Q56lUuvGqXK3vmS7k4oS18/SMNq5DCb2pa4PpNfSl vSTlEW+7hyYk9ad18b7IP68nvtOJM7CPxb2odMgnjPdSMnVlHKGrXf+nqSaqYHJUkuRk GP/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x128si2614032pgb.425.2017.07.18.14.57.36; Tue, 18 Jul 2017 14:57:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752632AbdGRVoL (ORCPT + 25 others); Tue, 18 Jul 2017 17:44:11 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34641 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752523AbdGRVoI (ORCPT ); Tue, 18 Jul 2017 17:44:08 -0400 Received: by mail-pg0-f66.google.com with SMTP id v190so4353072pgv.1; Tue, 18 Jul 2017 14:44:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=PyJj0xfAyDQ1XRL4LQ3syG/8aeVC2iVFEWPhIPtXI5U=; b=swkL86iV0xmacPSiK0osL8oF/gC4pkET2LG3tpY8S4I8j6GHq6ZxcmpGHQGP8zg7Zb NHfAtnMthanG6Ul5MAR8p7Gang2/K8T770YE2foY80WwawPCP2Qm2RxSKHYES31DNzys qGCxFqpa4ZuGKFMlV7iXXxvGP7egCMLMr3jVyBWBwJuoDIGx9E7Mlmy+7fu4Sa8H9pm4 iRMxJOjvYbh+LKfy2lc6h7rIZC3ZfWhaAgyBTndRG9NdxG+/ulNbNlFu9nAMk/Hpn4L4 Rqp2pm7tGXvCqMA9XZPXQ/KNCnQEm1jhoS3OArzM0lo5Czy2AjcjRjAusmtxWgh5UMkQ 7JOQ== X-Gm-Message-State: AIVw111NCaUajWCSbW84fgnwHrGpHiOl3hIjjfopcfKQ8fawvNd4fpeN g5FXIQplgKArc3yKCgo= X-Received: by 10.84.213.136 with SMTP id g8mr3745809pli.59.1500414248203; Tue, 18 Jul 2017 14:44:08 -0700 (PDT) Received: from localhost.localdomain (24-223-123-72.static.usa-companies.net. [24.223.123.72]) by smtp.googlemail.com with ESMTPSA id r207sm7186560pfr.106.2017.07.18.14.44.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jul 2017 14:44:07 -0700 (PDT) From: Rob Herring To: Herbert Xu Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, "David S. Miller" , linux-crypto@vger.kernel.org Subject: [PATCH] crypto: n2_core: Convert to using %pOF instead of full_name Date: Tue, 18 Jul 2017 16:42:56 -0500 Message-Id: <20170718214339.7774-16-robh@kernel.org> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org --- drivers/crypto/n2_core.c | 60 ++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 32 deletions(-) -- 2.11.0 diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c index 269451375b63..a9fd8b9e86cd 100644 --- a/drivers/crypto/n2_core.c +++ b/drivers/crypto/n2_core.c @@ -1730,8 +1730,8 @@ static int spu_mdesc_walk_arcs(struct mdesc_handle *mdesc, continue; id = mdesc_get_property(mdesc, tgt, "id", NULL); if (table[*id] != NULL) { - dev_err(&dev->dev, "%s: SPU cpu slot already set.\n", - dev->dev.of_node->full_name); + dev_err(&dev->dev, "%pOF: SPU cpu slot already set.\n", + dev->dev.of_node); return -EINVAL; } cpumask_set_cpu(*id, &p->sharing); @@ -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); if (!p) { - dev_err(&dev->dev, "%s: Could not allocate SPU queue.\n", - dev->dev.of_node->full_name); + dev_err(&dev->dev, "%pOF: Could not allocate SPU queue.\n", + dev->dev.of_node); return -ENOMEM; } @@ -1981,41 +1981,39 @@ static void n2_spu_driver_version(void) static int n2_crypto_probe(struct platform_device *dev) { struct mdesc_handle *mdesc; - const char *full_name; struct n2_crypto *np; int err; n2_spu_driver_version(); - full_name = dev->dev.of_node->full_name; - pr_info("Found N2CP at %s\n", full_name); + pr_info("Found N2CP at %pOF\n", dev->dev.of_node); np = alloc_n2cp(); if (!np) { - dev_err(&dev->dev, "%s: Unable to allocate n2cp.\n", - full_name); + dev_err(&dev->dev, "%pOF: Unable to allocate n2cp.\n", + dev->dev.of_node); return -ENOMEM; } err = grab_global_resources(); if (err) { - dev_err(&dev->dev, "%s: Unable to grab " - "global resources.\n", full_name); + dev_err(&dev->dev, "%pOF: Unable to grab global resources.\n", + dev->dev.of_node); goto out_free_n2cp; } mdesc = mdesc_grab(); if (!mdesc) { - dev_err(&dev->dev, "%s: Unable to grab MDESC.\n", - full_name); + dev_err(&dev->dev, "%pOF: Unable to grab MDESC.\n", + dev->dev.of_node); err = -ENODEV; goto out_free_global; } err = grab_mdesc_irq_props(mdesc, dev, &np->cwq_info, "n2cp"); if (err) { - dev_err(&dev->dev, "%s: Unable to grab IRQ props.\n", - full_name); + dev_err(&dev->dev, "%pOF: Unable to grab IRQ props.\n", + dev->dev.of_node); mdesc_release(mdesc); goto out_free_global; } @@ -2026,15 +2024,15 @@ static int n2_crypto_probe(struct platform_device *dev) mdesc_release(mdesc); if (err) { - dev_err(&dev->dev, "%s: CWQ MDESC scan failed.\n", - full_name); + dev_err(&dev->dev, "%pOF: CWQ MDESC scan failed.\n", + dev->dev.of_node); goto out_free_global; } err = n2_register_algs(); if (err) { - dev_err(&dev->dev, "%s: Unable to register algorithms.\n", - full_name); + dev_err(&dev->dev, "%pOF: Unable to register algorithms.\n", + dev->dev.of_node); goto out_free_spu_list; } @@ -2092,42 +2090,40 @@ static void free_ncp(struct n2_mau *mp) static int n2_mau_probe(struct platform_device *dev) { struct mdesc_handle *mdesc; - const char *full_name; struct n2_mau *mp; int err; n2_spu_driver_version(); - full_name = dev->dev.of_node->full_name; - pr_info("Found NCP at %s\n", full_name); + pr_info("Found NCP at %pOF\n", dev->dev.of_node); mp = alloc_ncp(); if (!mp) { - dev_err(&dev->dev, "%s: Unable to allocate ncp.\n", - full_name); + dev_err(&dev->dev, "%pOF: Unable to allocate ncp.\n", + dev->dev.of_node); return -ENOMEM; } err = grab_global_resources(); if (err) { - dev_err(&dev->dev, "%s: Unable to grab " - "global resources.\n", full_name); + dev_err(&dev->dev, "%pOF: Unable to grab global resources.\n", + dev->dev.of_node); goto out_free_ncp; } mdesc = mdesc_grab(); if (!mdesc) { - dev_err(&dev->dev, "%s: Unable to grab MDESC.\n", - full_name); + dev_err(&dev->dev, "%pOF: Unable to grab MDESC.\n", + dev->dev.of_node); err = -ENODEV; goto out_free_global; } err = grab_mdesc_irq_props(mdesc, dev, &mp->mau_info, "ncp"); if (err) { - dev_err(&dev->dev, "%s: Unable to grab IRQ props.\n", - full_name); + dev_err(&dev->dev, "%pOF: Unable to grab IRQ props.\n", + dev->dev.of_node); mdesc_release(mdesc); goto out_free_global; } @@ -2138,8 +2134,8 @@ static int n2_mau_probe(struct platform_device *dev) mdesc_release(mdesc); if (err) { - dev_err(&dev->dev, "%s: MAU MDESC scan failed.\n", - full_name); + dev_err(&dev->dev, "%pOF: MAU MDESC scan failed.\n", + dev->dev.of_node); goto out_free_global; }