From patchwork Tue Jul 18 21:43:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 108224 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp6488667qge; Tue, 18 Jul 2017 14:55:14 -0700 (PDT) X-Received: by 10.98.71.203 with SMTP id p72mr3932195pfi.106.1500414914445; Tue, 18 Jul 2017 14:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500414914; cv=none; d=google.com; s=arc-20160816; b=0Y/NhAgCx40DGLa5+Bd7uEdSvo5XIU+GmNpCt4IRZisJF1Nk1MvN3P68Vfdxlbr+DZ VjxjY2MUPN7hyqRtvuhSYDF0PEnPk66kADoHJZYMYNsIkutBVlVf0C75tcIEmuF7kqeP OEoWHFiM6JYoYCL6nFbhKb4laLQE3geTOG66OeHZZJgHTCzfG39LHWxZjKDaYp5zgJTL SFAZSJSVQmFQ+tZlNN/H/Dk0Ms2+cq+A97VSTRslRlHDkDdlTlr3eQMoFbZdpNmZlKZL ArmkAzG/H9C15XQEX/mH/jeLWDRKBL7Cs1Lmk15lXodi9g/WH9lDKKvacl3NV/DC/0cp yJGA== 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=Yro0iRRaeEd+8zXr7ECeYOowIbzvhCICjf4VO6itrOc=; b=jiDIH1D4P8Q14zZHpL6kaOrMCYn1AxLazEYWoZqILzgecPI0v9lKqY88uOg8FiQGFR eDrRg4QmFVjoS7jeOj5eLfjyznBYA+kIzyjKsDw/d7OWJ88EuhZFmk0BRU3/1soYao1e 1UPMnvU5qZJ8hRzUiLP1KbcEorUqD2hcB4NSNKpYfRGsSGtVa076RVCmtiJGc6ssVXwd hy1XBlRMLtcEWgiCVl/fyS6M1df8o02fk5DxQfk4UnsFaw7NHhpswIZKWfEHkTGCJJ1r uIR2FEQSDzf5pObMabQVO27AtQPHqQbs6jF9EL5LwO6PdMHG4aD6W6IzvBOl0vwRGeDf SYEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 r16si2618974pfg.36.2017.07.18.14.55.14; Tue, 18 Jul 2017 14:55:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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 devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752436AbdGRVzM (ORCPT + 7 others); Tue, 18 Jul 2017 17:55:12 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:32959 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752749AbdGRVoa (ORCPT ); Tue, 18 Jul 2017 17:44:30 -0400 Received: by mail-pg0-f68.google.com with SMTP id z1so4352629pgs.0; Tue, 18 Jul 2017 14:44:30 -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=uVRAnpgl4Sfnu13MlhbFba9HHpd2NA5gzBkjVkRhZw8=; b=VARX9ySudJzyyms8xBgjueP9XAcG1b+F/dHpN/xTARGdCXZXkT2VirH06plA+JqR17 uXI+9ejj44AR8tHuEbfDhH2Iyfzm84RO/0l2W12b6W8hHtuUoL0OY/vFxPWgnFg3mD2p 4ZM6Lxy1oY9wozFLkLJefxMLgrXNsG+bYXomRObrgNqUCIWkWJOUbwGSHhg8HSz2hWAi JSm8AJ0Lw7YN2wJAi4BfFKNzVHdPxrB6+8crFg5vzTnZ0h8X78gN3Gsc1j7Now5MJNss 74ZATLUvFHKqHoht3cDptEQCoWc3lAsVvXeRZgw0cVfYN3CZNpM3Ouu/Qz22GaaOi3Zw DctA== X-Gm-Message-State: AIVw110nktlP+KnBqPasaC2VyNTfEYRGkw5leBNtr6sJYtLRV7jgTql5 cqzQGezHK3hYAQ== X-Received: by 10.84.178.129 with SMTP id z1mr3827843plb.260.1500414269871; Tue, 18 Jul 2017 14:44:29 -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.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jul 2017 14:44:29 -0700 (PDT) From: Rob Herring To: Joerg Roedel Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Heiko Stuebner , iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH] iommu: Convert to using %pOF instead of full_name Date: Tue, 18 Jul 2017 16:43:09 -0500 Message-Id: <20170718214339.7774-29-robh@kernel.org> X-Mailer: git-send-email 2.11.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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: Joerg Roedel Cc: Heiko Stuebner Cc: iommu@lists.linux-foundation.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org --- drivers/iommu/fsl_pamu.c | 20 ++++++++------------ drivers/iommu/fsl_pamu_domain.c | 10 ++++------ drivers/iommu/of_iommu.c | 3 +-- drivers/iommu/rockchip-iommu.c | 10 +++++----- 4 files changed, 18 insertions(+), 25 deletions(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Heiko Stuebner diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c index a34355fca37a..919ad9045ac4 100644 --- a/drivers/iommu/fsl_pamu.c +++ b/drivers/iommu/fsl_pamu.c @@ -530,8 +530,8 @@ u32 get_stash_id(u32 stash_dest_hint, u32 vcpu) if (node) { prop = of_get_property(node, "cache-stash-id", NULL); if (!prop) { - pr_debug("missing cache-stash-id at %s\n", - node->full_name); + pr_debug("missing cache-stash-id at %pOF\n", + node); of_node_put(node); return ~(u32)0; } @@ -557,8 +557,8 @@ u32 get_stash_id(u32 stash_dest_hint, u32 vcpu) if (stash_dest_hint == cache_level) { prop = of_get_property(node, "cache-stash-id", NULL); if (!prop) { - pr_debug("missing cache-stash-id at %s\n", - node->full_name); + pr_debug("missing cache-stash-id at %pOF\n", + node); of_node_put(node); return ~(u32)0; } @@ -568,8 +568,7 @@ u32 get_stash_id(u32 stash_dest_hint, u32 vcpu) prop = of_get_property(node, "next-level-cache", NULL); if (!prop) { - pr_debug("can't find next-level-cache at %s\n", - node->full_name); + pr_debug("can't find next-level-cache at %pOF\n", node); of_node_put(node); return ~(u32)0; /* can't traverse any further */ } @@ -1063,8 +1062,7 @@ static int fsl_pamu_probe(struct platform_device *pdev) guts_node = of_find_matching_node(NULL, guts_device_ids); if (!guts_node) { - dev_err(dev, "could not find GUTS node %s\n", - dev->of_node->full_name); + dev_err(dev, "could not find GUTS node %pOF\n", dev->of_node); ret = -ENODEV; goto error; } @@ -1246,8 +1244,7 @@ static __init int fsl_pamu_init(void) pdev = platform_device_alloc("fsl-of-pamu", 0); if (!pdev) { - pr_err("could not allocate device %s\n", - np->full_name); + pr_err("could not allocate device %pOF\n", np); ret = -ENOMEM; goto error_device_alloc; } @@ -1259,8 +1256,7 @@ static __init int fsl_pamu_init(void) ret = platform_device_add(pdev); if (ret) { - pr_err("could not add device %s (err=%i)\n", - np->full_name, ret); + pr_err("could not add device %pOF (err=%i)\n", np, ret); goto error_device_add; } diff --git a/drivers/iommu/fsl_pamu_domain.c b/drivers/iommu/fsl_pamu_domain.c index da0e1e30ef37..01c73479345d 100644 --- a/drivers/iommu/fsl_pamu_domain.c +++ b/drivers/iommu/fsl_pamu_domain.c @@ -619,8 +619,8 @@ static int handle_attach_device(struct fsl_dma_domain *dma_domain, for (i = 0; i < num; i++) { /* Ensure that LIODN value is valid */ if (liodn[i] >= PAACE_NUMBER_ENTRIES) { - pr_debug("Invalid liodn %d, attach device failed for %s\n", - liodn[i], dev->of_node->full_name); + pr_debug("Invalid liodn %d, attach device failed for %pOF\n", + liodn[i], dev->of_node); ret = -EINVAL; break; } @@ -684,8 +684,7 @@ static int fsl_pamu_attach_device(struct iommu_domain *domain, liodn_cnt = len / sizeof(u32); ret = handle_attach_device(dma_domain, dev, liodn, liodn_cnt); } else { - pr_debug("missing fsl,liodn property at %s\n", - dev->of_node->full_name); + pr_debug("missing fsl,liodn property at %pOF\n", dev->of_node); ret = -EINVAL; } @@ -720,8 +719,7 @@ static void fsl_pamu_detach_device(struct iommu_domain *domain, if (prop) detach_device(dev, dma_domain); else - pr_debug("missing fsl,liodn property at %s\n", - dev->of_node->full_name); + pr_debug("missing fsl,liodn property at %pOF\n", dev->of_node); } static int configure_domain_geometry(struct iommu_domain *domain, void *data) diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c index 8cb60829a7a1..fe91b35ddf7f 100644 --- a/drivers/iommu/of_iommu.c +++ b/drivers/iommu/of_iommu.c @@ -255,8 +255,7 @@ static int __init of_iommu_init(void) const of_iommu_init_fn init_fn = match->data; if (init_fn && init_fn(np)) - pr_err("Failed to initialise IOMMU %s\n", - of_node_full_name(np)); + pr_err("Failed to initialise IOMMU %pOF\n", np); } return 0; diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index 4ba48a26b389..1b8155dada26 100644 --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c @@ -1008,20 +1008,20 @@ static int rk_iommu_group_set_iommudata(struct iommu_group *group, ret = of_parse_phandle_with_args(np, "iommus", "#iommu-cells", 0, &args); if (ret) { - dev_err(dev, "of_parse_phandle_with_args(%s) => %d\n", - np->full_name, ret); + dev_err(dev, "of_parse_phandle_with_args(%pOF) => %d\n", + np, ret); return ret; } if (args.args_count != 0) { - dev_err(dev, "incorrect number of iommu params found for %s (found %d, expected 0)\n", - args.np->full_name, args.args_count); + dev_err(dev, "incorrect number of iommu params found for %pOF (found %d, expected 0)\n", + args.np, args.args_count); return -EINVAL; } pd = of_find_device_by_node(args.np); of_node_put(args.np); if (!pd) { - dev_err(dev, "iommu %s not found\n", args.np->full_name); + dev_err(dev, "iommu %pOF not found\n", args.np); return -EPROBE_DEFER; }