From patchwork Wed Dec 5 19:50:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 152969 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp9697585ljp; Wed, 5 Dec 2018 11:53:54 -0800 (PST) X-Google-Smtp-Source: AFSGD/WX06VMcbBiX5W8Qtfp48lfGGVtcxouGfzvlJp1N2TZwDWPaw1AoHLAiT0wjHyQb+pGmxGf X-Received: by 2002:a17:902:b406:: with SMTP id x6mr24295171plr.329.1544039634045; Wed, 05 Dec 2018 11:53:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544039634; cv=none; d=google.com; s=arc-20160816; b=wYe9X6c+TANE05klGc9qFykNXbVj+MYTceaR8Oskpe8XPcshW4JYj8h5oxt+NP24oJ o6TFRXRDTnqOL4tzY+DIyGpJr0K3/s+PDATW4Z7B3MStuidmpPZ6ddxXwn2VLsQI2wl5 YU+IToYAaCJHjnSF1dmqJmCx/ZNNbibBCQmtgLoMrMHiiJP+bVml5v4kDsgoYXIWUVHZ m8poaqcr+iV8Z0EPdCuXNusf//Ko77bXSZFclTm66rYLeUdQgIg1szqyod7+ShT5+eFM GJrkJNQDj9WBXtvNbzqpkIvrFFIfA9nIneG4NoMvtf1S8WiRyDUF4kWlZMaF/U/OlqwD bpKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=qMf/8b8HPdVUaDDlxlxbmj1xfhA6XtWizfCJKwehYSU=; b=mbKZrn3TqLC8MzfI4TOra08YrejjQpU59RZW+yB4S2kqJjwjBUQA8yBMH9FMK3hxfN 0a8H3K1Qf+8UBa/phJ0YKxQf1ZRRTnoTIcgrTlOphhjmue9eylRi6H4XD5B3fLrxYOdS 7RtfKav12VR9/kLEWqZdA63x5WY7j9HHUv43yrNIqSEyt1Tm1enIplV2bhlBw33lCQc0 /mU3VrXK0whiyAClGQt6h1xuUnMIXJ5fJSHo0GQCkjfQ4ZCIJfY9KeuVQcL40WNiEV9e XQynAAlfsIO8sSBwZJlwHluGUGEs6AtVJw+Deh+/L33Aer2i3fayVAmto1v13aLiWouo bepw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u11si24248635plm.8.2018.12.05.11.53.53; Wed, 05 Dec 2018 11:53:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-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-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728650AbeLETxw (ORCPT + 5 others); Wed, 5 Dec 2018 14:53:52 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:37584 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728601AbeLETu5 (ORCPT ); Wed, 5 Dec 2018 14:50:57 -0500 Received: by mail-ot1-f65.google.com with SMTP id 40so19801522oth.4; Wed, 05 Dec 2018 11:50:57 -0800 (PST) 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:mime-version :content-transfer-encoding; bh=qMf/8b8HPdVUaDDlxlxbmj1xfhA6XtWizfCJKwehYSU=; b=T6uCCHPpvMBGqcCT76BgHw9dl6mLANprobfA8VHQmQJnYbNDgm8SbbYckGskBpaZLa /ETqUtLTY115Vr6tKXMAsadLBaNsgjqzJNTn/vHSFvl5mf85J/9O0e49MXq7HtbJHVbr PsJBX+ztUZ2krj6ko8TJ5Bukv0AGv+dbekyzz6WUa289kGs+eEZNr1jsw24N5QG3aF5z P93URXiNNceQXQ86DWO3/lqiY7haTP96YuGhramfxrR6QFE2K1OyMQNL6a1qqoTNJWlp 5oZlJXmNUYOM9ZNnybCbz5c3QeyENgFp7/nV2vc9gJ51oJ8BqT6tqkCnAo3S/z/8K8X2 VIUg== X-Gm-Message-State: AA+aEWZvqEwMJ+3DkOe3b7c3q+Ea/QBtQCUL8aMhHh2FSXvbzBIGREZ8 s+XagDdnPxkd+9e7ywYnLvnl9Qo= X-Received: by 2002:a9d:5e0b:: with SMTP id d11mr15115452oti.145.1544039456498; Wed, 05 Dec 2018 11:50:56 -0800 (PST) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id k13sm25759879otj.19.2018.12.05.11.50.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 11:50:55 -0800 (PST) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Geert Uytterhoeven , Michael Turquette , Stephen Boyd , Tero Kristo , Ulf Hansson , linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] clk: Use of_node_name_eq for node name comparisons Date: Wed, 5 Dec 2018 13:50:21 -0600 Message-Id: <20181205195050.4759-5-robh@kernel.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. For instances using of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which all of these are. Cc: Geert Uytterhoeven Cc: Michael Turquette Cc: Stephen Boyd Cc: Tero Kristo Cc: Ulf Hansson Cc: linux-renesas-soc@vger.kernel.org Cc: linux-clk@vger.kernel.org Cc: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring --- drivers/clk/renesas/clk-mstp.c | 2 +- drivers/clk/ti/clkctrl.c | 2 +- drivers/clk/ti/dpll.c | 2 +- drivers/clk/ux500/u8500_of_clk.c | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) -- 2.19.1 Acked-by: Ulf Hansson diff --git a/drivers/clk/renesas/clk-mstp.c b/drivers/clk/renesas/clk-mstp.c index 1c1768c2cc82..765175d1148a 100644 --- a/drivers/clk/renesas/clk-mstp.c +++ b/drivers/clk/renesas/clk-mstp.c @@ -280,7 +280,7 @@ int cpg_mstp_attach_dev(struct generic_pm_domain *unused, struct device *dev) goto found; /* BSC on r8a73a4/sh73a0 uses zb_clk instead of an mstp clock */ - if (!strcmp(clkspec.np->name, "zb_clk")) + if (of_node_name_eq(clkspec.np, "zb_clk")) goto found; of_node_put(clkspec.np); diff --git a/drivers/clk/ti/clkctrl.c b/drivers/clk/ti/clkctrl.c index 469f560ae1cf..40630eb950fc 100644 --- a/drivers/clk/ti/clkctrl.c +++ b/drivers/clk/ti/clkctrl.c @@ -448,7 +448,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) char *c; if (!(ti_clk_get_features()->flags & TI_CLK_CLKCTRL_COMPAT) && - !strcmp(node->name, "clk")) + of_node_name_eq(node, "clk")) ti_clk_features.flags |= TI_CLK_CLKCTRL_COMPAT; addrp = of_get_address(node, 0, NULL, NULL); diff --git a/drivers/clk/ti/dpll.c b/drivers/clk/ti/dpll.c index 92e28af7afba..6c3329bc116f 100644 --- a/drivers/clk/ti/dpll.c +++ b/drivers/clk/ti/dpll.c @@ -410,7 +410,7 @@ static void __init of_ti_omap3_dpll_setup(struct device_node *node) if ((of_machine_is_compatible("ti,omap3630") || of_machine_is_compatible("ti,omap36xx")) && - !strcmp(node->name, "dpll5_ck")) + of_node_name_eq(node, "dpll5_ck")) of_ti_dpll_setup(node, &omap3_dpll5_ck_ops, &dd); else of_ti_dpll_setup(node, &omap3_dpll_ck_ops, &dd); diff --git a/drivers/clk/ux500/u8500_of_clk.c b/drivers/clk/ux500/u8500_of_clk.c index d5888591e1a9..18a3c4522831 100644 --- a/drivers/clk/ux500/u8500_of_clk.c +++ b/drivers/clk/ux500/u8500_of_clk.c @@ -545,21 +545,21 @@ static void u8500_clk_init(struct device_node *np) for_each_child_of_node(np, child) { static struct clk_onecell_data clk_data; - if (!of_node_cmp(child->name, "prcmu-clock")) { + if (of_node_name_eq(child, "prcmu-clock")) { clk_data.clks = prcmu_clk; clk_data.clk_num = ARRAY_SIZE(prcmu_clk); of_clk_add_provider(child, of_clk_src_onecell_get, &clk_data); } - if (!of_node_cmp(child->name, "prcc-periph-clock")) + if (of_node_name_eq(child, "prcc-periph-clock")) of_clk_add_provider(child, ux500_twocell_get, prcc_pclk); - if (!of_node_cmp(child->name, "prcc-kernel-clock")) + if (of_node_name_eq(child, "prcc-kernel-clock")) of_clk_add_provider(child, ux500_twocell_get, prcc_kclk); - if (!of_node_cmp(child->name, "rtc32k-clock")) + if (of_node_name_eq(child, "rtc32k-clock")) of_clk_add_provider(child, of_clk_src_simple_get, rtc_clk); - if (!of_node_cmp(child->name, "smp-twd-clock")) + if (of_node_name_eq(child, "smp-twd-clock")) of_clk_add_provider(child, of_clk_src_simple_get, twd_clk); } }