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: 9849623 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DBF5A60392 for ; Tue, 18 Jul 2017 21:45:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5A02206AC for ; Tue, 18 Jul 2017 21:45:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BA5E622B27; Tue, 18 Jul 2017 21:45:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 07B4F206AC for ; Tue, 18 Jul 2017 21:45:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=JyOfi9TEBGJV7EWIsK7foWqRoYyTx55qHFGhjnx2ANE=; b=u/9 p9sqXTSbydJDGWGYrECqt3zIKD5x6UCRzqz1f5dkQSrvhX1/75Q/Lm3YBxWRnkAWlreV745Dgmu5F BSjvCD63mWwRSLGI1O93H8aP475tI7ZcHcproqtNet63FgiYeC8/tM1YeiEnOHVoWSn2Pus0OLoPd U4zA3q1KCpcmOVLHCoWwRO1NXNEbriWCwr+AB+QkZu63bgwzUAF60KBoDi378zdepfUVeiVDoNJ2b pQqAEuLh1x1+dkoqG65/qZr4Eq9z8qFGAoUXc82ZrRy973nEamzKDFuynakP/FQQ0baeXiizlBkmQ 1gaf21HuEOkd282XY9ChsoTKpuLVowA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dXaIi-0002ev-83; Tue, 18 Jul 2017 21:45:04 +0000 Received: from mail-pf0-f194.google.com ([209.85.192.194]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dXaI0-0001uY-VV for linux-arm-kernel@lists.infradead.org; Tue, 18 Jul 2017 21:44:28 +0000 Received: by mail-pf0-f194.google.com with SMTP id e199so4070463pfh.0 for ; 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=NmNshIRtyPU+3uSx5xESyZRSRN7C9qi/wBVqklTetEftrotm2VIZwS+i9eUpAR9Fff ytILeFbQ72/CDPe3xNlBqpxYbOCMTEUWOmCnSWD+LFchVSERjwXHUEUEhLoefzjN2ygY KVk2pffI/ila0253nijAI7+IIcBMuPlre9HFGL/MxdIPu5cUhWZSbRuHUdmHNHXliYAP dsGR6i03V+reBB3yUXYX8DSo6pjVDkRmr215SUieoXrHM8JoVyiVl3hAYJnM35kbPaH+ ZftcaGwaSBdB9UCnzC8ik1HOs7NTcOR73/KqhbaFNK3NfqVvq9494HuQvnKEzpPsrzmr LNZQ== X-Gm-Message-State: AIVw113jq0Fk61EBD7HRHIbxW8PIq7bVLjbmAj5axnIFshwRSbh5nvZ8 8B+cni1Vhez95A== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170718_144421_731421_A2BBDC76 X-CRM114-Status: GOOD ( 11.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Alexandre Torgue , linux-kernel@vger.kernel.org, Maxime Coquelin , linux-arm-kernel@lists.infradead.org, Marc Gonzalez MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Marc Gonzalez Acked-by: Alexandre TORGUE --- 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 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;