From patchwork Tue Jul 18 21:42:53 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: 108236 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp6492143qge; Tue, 18 Jul 2017 14:59:19 -0700 (PDT) X-Received: by 10.84.210.43 with SMTP id z40mr3940802plh.235.1500415159198; Tue, 18 Jul 2017 14:59:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500415159; cv=none; d=google.com; s=arc-20160816; b=oL6Yc1pYZyN8dvuBkst+L4KmK3Csud6GNw9SMMoIG96eUZczeXqJJR+ovqSFyYgT5e 58K+W7oXu6352b1Qgc5GFspUxyMLTKDxCVu+pDpC/3hjVEPEhLEDfbl16+kIW74y/G/n 6F8/jv1nf6dBlpClqDk57wFKzxg9XH7yvF7Z3A5fuOiLBBjnlV+7olq1U3Yw2dvg0aOz 1yEdhr05D4bbP+078eI7avPWe2sUJPkcAc6LYFbSApzOSwcD1GSPrQX5iWvGlXw+ii2j ymGqiOA+qK472hXbUG37w4KLdISCn/qkBnptM/gpuJqHO+S+0vR1UVPkRReGBWr0aCBZ XCHg== 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=jOKrAS3FIMAIxakcCMhT20Ekn4Crky+TSlhhEJBM3ew=; b=IGuASJof2+IgF1cAB3dmI9s6NDofZLu/cMn4W0cIwU1WRWYgaYPq+LWZMr09E7IU4V nqegKL+bI1wqyGgQyrK4A0LCyYKJqrbiQxJZH4emPHMFyh+2bdiGrFNydkIcYb2UL0PA uq6wosyDZ4JMDeCv2q0w26XKPZiCdbrtwMVzihe+ozICZKIfEwSvoVlcQ6v3Cl/7kUT+ F/qmovnk7qnqHbgFSlHVzCMwsCFgJpJ2/VMfpltrV+sLa4Qh1dMROvhaVaWOgeMJz2ew nJrkwJvYjtS6voKSQJP8/Dp0reH948qSPOXWKu4fWOTbp8wv/zJdvk3dj7jvMQkJD95X UoGg== 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 i3si2666035plk.469.2017.07.18.14.59.18; Tue, 18 Jul 2017 14:59:19 -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 S1753075AbdGRV6s (ORCPT + 25 others); Tue, 18 Jul 2017 17:58:48 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34847 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752531AbdGRVoE (ORCPT ); Tue, 18 Jul 2017 17:44:04 -0400 Received: by mail-pf0-f193.google.com with SMTP id q85so4058012pfq.2; Tue, 18 Jul 2017 14:44:04 -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=jOKrAS3FIMAIxakcCMhT20Ekn4Crky+TSlhhEJBM3ew=; b=rgr2zv3aGaO9gcm+cwLtitu+NRsyX0OOXCOZQDmGbNNsIkyvq9abAaYqvhxoMGS30M HQbl3SAK7uIeiKSN2vwvzCsIWjNZCask2wNYOUHTwSFg/c37jV5EXCvcT8L156Cf5ENe Lh/eNeUXSsxRxtP2KtMFbfWzQemkJkUp7wuZ1DKb0e7OOpiIaPkOgU1IGOZL2z0NBZ+R GyoOpFr6ZKDWjL1qPXgC9mDmc+WKZdx9OeyzOeDWOHkGlVA4qHClicRQEd3SulU9oWxq /qZrNcw81mwqw6nqVchTJ3T7w0lqb+SnnpxR8Q1JLLezIVlOhj8BdAItLkjLJOZ4QHVu YFYQ== X-Gm-Message-State: AIVw113G6aD20rCZOqDCSQ+BN121wQZ/hzTTAeTI2PQMzKc8ckH5AaOw /DTvmSutjAYIrx4V9nM= X-Received: by 10.99.8.129 with SMTP id 123mr3684558pgi.87.1500414243920; Tue, 18 Jul 2017 14:44:03 -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.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jul 2017 14:44:03 -0700 (PDT) From: Rob Herring To: Daniel Lezcano , Thomas Gleixner Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Marc Gonzalez , Maxime Coquelin , Alexandre Torgue , linux-arm-kernel@lists.infradead.org Subject: [PATCH] clocksource: Convert to using %pOF instead of full_name Date: Tue, 18 Jul 2017 16:42:53 -0500 Message-Id: <20170718214339.7774-13-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: Daniel Lezcano Cc: Thomas Gleixner Cc: Marc Gonzalez Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: linux-arm-kernel@lists.infradead.org --- drivers/clocksource/tango_xtal.c | 6 +++--- drivers/clocksource/timer-of.c | 11 +++++------ drivers/clocksource/timer-probe.c | 3 +-- drivers/clocksource/timer-stm32.c | 8 ++++---- 4 files changed, 13 insertions(+), 15 deletions(-) -- 2.11.0 Acked-by: Marc Gonzalez Acked-by: Alexandre TORGUE diff --git a/drivers/clocksource/tango_xtal.c b/drivers/clocksource/tango_xtal.c index c4e1c2e6046f..6a8d9838ce33 100644 --- a/drivers/clocksource/tango_xtal.c +++ b/drivers/clocksource/tango_xtal.c @@ -26,13 +26,13 @@ static int __init tango_clocksource_init(struct device_node *np) xtal_in_cnt = of_iomap(np, 0); if (xtal_in_cnt == NULL) { - pr_err("%s: invalid address\n", np->full_name); + pr_err("%pOF: invalid address\n", np); return -ENXIO; } clk = of_clk_get(np, 0); if (IS_ERR(clk)) { - pr_err("%s: invalid clock\n", np->full_name); + pr_err("%pOF: invalid clock\n", np); return PTR_ERR(clk); } @@ -43,7 +43,7 @@ static int __init tango_clocksource_init(struct device_node *np) ret = clocksource_mmio_init(xtal_in_cnt, "tango-xtal", xtal_freq, 350, 32, clocksource_mmio_readl_up); if (ret) { - pr_err("%s: registration failed\n", np->full_name); + pr_err("%pOF: registration failed\n", np); return ret; } diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c index f6e7491c873c..a07b923d3d6e 100644 --- a/drivers/clocksource/timer-of.c +++ b/drivers/clocksource/timer-of.c @@ -44,7 +44,7 @@ static __init int timer_irq_init(struct device_node *np, of_irq->irq = of_irq->name ? of_irq_get_byname(np, of_irq->name): irq_of_parse_and_map(np, of_irq->index); if (!of_irq->irq) { - pr_err("Failed to map interrupt for %s\n", np->full_name); + pr_err("Failed to map interrupt for %pOF\n", np); return -EINVAL; } @@ -55,8 +55,7 @@ static __init int timer_irq_init(struct device_node *np, of_irq->flags ? of_irq->flags : IRQF_TIMER, np->full_name, clkevt); if (ret) { - pr_err("Failed to request irq %d for %s\n", of_irq->irq, - np->full_name); + pr_err("Failed to request irq %d for %pOF\n", of_irq->irq, np); return ret; } @@ -80,20 +79,20 @@ static __init int timer_clk_init(struct device_node *np, of_clk->clk = of_clk->name ? of_clk_get_by_name(np, of_clk->name) : of_clk_get(np, of_clk->index); if (IS_ERR(of_clk->clk)) { - pr_err("Failed to get clock for %s\n", np->full_name); + pr_err("Failed to get clock for %pOF\n", np); return PTR_ERR(of_clk->clk); } ret = clk_prepare_enable(of_clk->clk); if (ret) { - pr_err("Failed for enable clock for %s\n", np->full_name); + pr_err("Failed for enable clock for %pOF\n", np); goto out_clk_put; } of_clk->rate = clk_get_rate(of_clk->clk); if (!of_clk->rate) { ret = -EINVAL; - pr_err("Failed to get clock rate for %s\n", np->full_name); + pr_err("Failed to get clock rate for %pOF\n", np); goto out_clk_disable; } diff --git a/drivers/clocksource/timer-probe.c b/drivers/clocksource/timer-probe.c index da81e5de74fe..028075720334 100644 --- a/drivers/clocksource/timer-probe.c +++ b/drivers/clocksource/timer-probe.c @@ -40,8 +40,7 @@ void __init timer_probe(void) ret = init_func_ret(np); if (ret) { - pr_err("Failed to initialize '%s': %d\n", - of_node_full_name(np), ret); + pr_err("Failed to initialize '%pOF': %d\n", np, ret); continue; } diff --git a/drivers/clocksource/timer-stm32.c b/drivers/clocksource/timer-stm32.c index 174d1243ea93..8f2423789ba9 100644 --- a/drivers/clocksource/timer-stm32.c +++ b/drivers/clocksource/timer-stm32.c @@ -138,7 +138,7 @@ static int __init stm32_clockevent_init(struct device_node *np) irq = irq_of_parse_and_map(np, 0); if (!irq) { ret = -EINVAL; - pr_err("%s: failed to get irq.\n", np->full_name); + pr_err("%pOF: failed to get irq.\n", np); goto err_get_irq; } @@ -168,12 +168,12 @@ static int __init stm32_clockevent_init(struct device_node *np) ret = request_irq(irq, stm32_clock_event_handler, IRQF_TIMER, "stm32 clockevent", data); if (ret) { - pr_err("%s: failed to request irq.\n", np->full_name); + pr_err("%pOF: failed to request irq.\n", np); goto err_get_irq; } - pr_info("%s: STM32 clockevent driver initialized (%d bits)\n", - np->full_name, bits); + pr_info("%pOF: STM32 clockevent driver initialized (%d bits)\n", + np, bits); return ret;