From patchwork Tue Jul 18 21:43:31 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: 108206 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp6481258qge; Tue, 18 Jul 2017 14:46:12 -0700 (PDT) X-Received: by 10.99.56.68 with SMTP id h4mr3345590pgn.52.1500414372805; Tue, 18 Jul 2017 14:46:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500414372; cv=none; d=google.com; s=arc-20160816; b=Fn8FryrayaTYpb34UAvvO85nTgKmjkzGG2vU7ka/8Nq43+cCV8NXluyiiR5XH/1XFr HTxZsqCoZnfHnC5JXbfvwPehR9SZgyeczGC8NwDcdC+y2KW/GgP23QiHek+PFi/ImEyu LEBgOxmWgody00NWU/fSxcuZdfzp6DIW3atqPybFOfqnNXjydlMGJ9y9ikm3BO7G8+Yt Oq9/WHLZu2O/FeWh1HbB2uciqm+cE4j0/29o5yJbJNM3v/kau54mAuwL+MoxPA+NAt9V F0fPxuZ/o+zKMuVjwi4iwDuN/eajwIyqOKKQHUZvYWjRCWSsedmYZDfiJrp6sIBGDJy0 2y2w== 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=ixVyqtd1y/Zo6l6Uwk8jIe9UurTG6cGqbvGfNvNGPwc=; b=xsipHljSK5vVzzZ8T+R/WhJnByRke6ttYXaGU2U2Yq2GkHF2yPP8++m9saR/m03iMS +yAW5sLDkpdB3nz/Ci4bRfNP580Ocq0xTFbfmFcqHbzeYevDK6sGKYefJlKNJU7YEsN8 ynMx4loNKbi6Hw4j4a3SVfMPcaKeEyS/xyDTNMTbanfUyTT5qd/+j4M4OxfOTP7AqnmI Jv4B0tmNWsJA9b/R9fUbJsl0hKzGRDSCwdJeQl5BvX+rJaTaQHFg+d5U4yaZ9wvyWLK2 zDjHj2N08xrXwmDKC8bmkP9c28vU0g9xqPluBcAfMmYEJ7j6KKLRvKxfWiEe9OzUwK3+ Mu4A== 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 s62si2587299pgb.247.2017.07.18.14.46.12; Tue, 18 Jul 2017 14:46:12 -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 S1753038AbdGRVpP (ORCPT + 25 others); Tue, 18 Jul 2017 17:45:15 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33947 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752952AbdGRVpH (ORCPT ); Tue, 18 Jul 2017 17:45:07 -0400 Received: by mail-pf0-f196.google.com with SMTP id o88so4066243pfk.1; Tue, 18 Jul 2017 14:45:07 -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=ixVyqtd1y/Zo6l6Uwk8jIe9UurTG6cGqbvGfNvNGPwc=; b=GeN6Qzn+jhjkhSJtJDUlAc1UJRJvRG+uA2lxbxaDlA4n2IBU0yvV2MlrBpZyeAqzSD 73kqBauUQ95lx8VJk6t5rht/MEthtdS8/4btC1viqlq8EYxAIgXxi7gbn59HFdZKb5V/ uUl5ED8IghPsdJ/JBmxWpXCpFkbpfj4eFW7KxO94hx3XKsQ/zfOgpOy3QPjNbRfzilvM n7P6llRiCf1AH73wf3xKZuC/1edQ66My3W0wUUpZlk0p6R/pqPX1E0K/FveRZsQw06hi chviMq4Y54JEW1MB0zzFMEXphb+RgM/qwvFqdPkEbb2+V+89rxqi3MPPsnN3As9nZb2h gvbA== X-Gm-Message-State: AIVw110vCNgy+IY09mACb78e2V2mV6InDsI72FsYcJhWvDziLoZVjqWB Csmoe8bqKhqNv4vtI55r2g== X-Received: by 10.84.232.13 with SMTP id h13mr3905555plk.168.1500414306559; Tue, 18 Jul 2017 14:45:06 -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.45.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jul 2017 14:45:06 -0700 (PDT) From: Rob Herring To: Mark Brown Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-spi@vger.kernel.org Subject: [PATCH] spi: Convert to using %pOF instead of full_name Date: Tue, 18 Jul 2017 16:43:31 -0500 Message-Id: <20170718214339.7774-51-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: Mark Brown Cc: linux-spi@vger.kernel.org --- drivers/spi/spi-orion.c | 4 ++-- drivers/spi/spi.c | 27 +++++++++++---------------- 2 files changed, 13 insertions(+), 18 deletions(-) -- 2.11.0 diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c index 28fc9f161b9d..4b6dd73b80da 100644 --- a/drivers/spi/spi-orion.c +++ b/drivers/spi/spi-orion.c @@ -669,8 +669,8 @@ static int orion_spi_probe(struct platform_device *pdev) status = of_property_read_u32(np, "reg", &cs); if (status) { dev_err(&pdev->dev, - "%s has no valid 'reg' property (%d)\n", - np->full_name, status); + "%pOF has no valid 'reg' property (%d)\n", + np, status); status = 0; continue; } diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 4fcbb0aa71d3..0725c78b0de6 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1583,8 +1583,8 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi, if (spi_controller_is_slave(ctlr)) { if (strcmp(nc->name, "slave")) { - dev_err(&ctlr->dev, "%s is not called 'slave'\n", - nc->full_name); + dev_err(&ctlr->dev, "%pOF is not called 'slave'\n", + nc); return -EINVAL; } return 0; @@ -1593,8 +1593,8 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi, /* Device address */ rc = of_property_read_u32(nc, "reg", &value); if (rc) { - dev_err(&ctlr->dev, "%s has no valid 'reg' property (%d)\n", - nc->full_name, rc); + dev_err(&ctlr->dev, "%pOF has no valid 'reg' property (%d)\n", + nc, rc); return rc; } spi->chip_select = value; @@ -1603,8 +1603,7 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi, rc = of_property_read_u32(nc, "spi-max-frequency", &value); if (rc) { dev_err(&ctlr->dev, - "%s has no valid 'spi-max-frequency' property (%d)\n", - nc->full_name, rc); + "%pOF has no valid 'spi-max-frequency' property (%d)\n", nc, rc); return rc; } spi->max_speed_hz = value; @@ -1621,8 +1620,7 @@ of_register_spi_device(struct spi_controller *ctlr, struct device_node *nc) /* Alloc an spi_device */ spi = spi_alloc_device(ctlr); if (!spi) { - dev_err(&ctlr->dev, "spi_device alloc error for %s\n", - nc->full_name); + dev_err(&ctlr->dev, "spi_device alloc error for %pOF\n", nc); rc = -ENOMEM; goto err_out; } @@ -1631,8 +1629,7 @@ of_register_spi_device(struct spi_controller *ctlr, struct device_node *nc) rc = of_modalias_node(nc, spi->modalias, sizeof(spi->modalias)); if (rc < 0) { - dev_err(&ctlr->dev, "cannot find modalias for %s\n", - nc->full_name); + dev_err(&ctlr->dev, "cannot find modalias for %pOF\n", nc); goto err_out; } @@ -1647,8 +1644,7 @@ of_register_spi_device(struct spi_controller *ctlr, struct device_node *nc) /* Register the new device */ rc = spi_add_device(spi); if (rc) { - dev_err(&ctlr->dev, "spi_device register error %s\n", - nc->full_name); + dev_err(&ctlr->dev, "spi_device register error %pOF\n", nc); goto err_of_node_put; } @@ -1682,8 +1678,7 @@ static void of_register_spi_devices(struct spi_controller *ctlr) spi = of_register_spi_device(ctlr, nc); if (IS_ERR(spi)) { dev_warn(&ctlr->dev, - "Failed to create SPI device for %s\n", - nc->full_name); + "Failed to create SPI device for %pOF\n", nc); of_node_clear_flag(nc, OF_POPULATED); } } @@ -3311,8 +3306,8 @@ static int of_spi_notify(struct notifier_block *nb, unsigned long action, put_device(&ctlr->dev); if (IS_ERR(spi)) { - pr_err("%s: failed to create for '%s'\n", - __func__, rd->dn->full_name); + pr_err("%s: failed to create for '%pOF'\n", + __func__, rd->dn); of_node_clear_flag(rd->dn, OF_POPULATED); return notifier_from_errno(PTR_ERR(spi)); }