From patchwork Wed Dec 5 19:50:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 10714837 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 39DC618B8 for ; Wed, 5 Dec 2018 19:53:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A7972E34E for ; Wed, 5 Dec 2018 19:53:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D44F2E356; Wed, 5 Dec 2018 19:53:52 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CCE02E36D for ; Wed, 5 Dec 2018 19:53:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728646AbeLETvA (ORCPT ); Wed, 5 Dec 2018 14:51:00 -0500 Received: from mail-oi1-f195.google.com ([209.85.167.195]:33053 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728628AbeLETu7 (ORCPT ); Wed, 5 Dec 2018 14:50:59 -0500 Received: by mail-oi1-f195.google.com with SMTP id c206so18672388oib.0; Wed, 05 Dec 2018 11:50:58 -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=ipiihTdwGrlX+ons2IhQ9+ZcJCpVaVxx2iEVJRMYgr4=; b=eaEZ34Ro07sR7yL6mCKxdvhDJ91uB6I4fUlpM6asTZXp5jxL6Cr8fsmrKZpd6I6HkC jj1TshYTXNpeCAb25ukPd4YQej5JBLRxQWbT6FpIqV911Wm6R509ONCXQyNafTBmgQVF ojiniVAI8++Kzx/96vo7r5kvH6Gn5ZMLv7BeOEGAZlqhgk6zxyp/O8plHY34OvQrNu6N zaSafsekFKfF59qumsWot2hEyal6ZnVUx1poDAcwTnZ2kgPpL+4Rnob0iIgE+xOOemCj 6qbxdvYumxXLOMIShBr7407Qv/C65r9DP+xRaWydM7ozrtgCoAjaK8fy8mB6ns4pAQM1 GwTQ== X-Gm-Message-State: AA+aEWY4tS0G2+dGGlSavtfe+z8rEZ4NP2+zOevGMJaFiiDlxCcP9oIv JmkG9l5dB6ggr1mamSVJY3Tq25w= X-Google-Smtp-Source: AFSGD/UZvxBqCY3JOfT6rY2Quj+tFDglL3wTaHZAdpELyGuR1Pk+5RHWz0USV747XbenS/KHVaYvrQ== X-Received: by 2002:aca:e401:: with SMTP id b1mr15022730oih.231.1544039457753; Wed, 05 Dec 2018 11:50:57 -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.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 11:50:57 -0800 (PST) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Chanwoo Choi , MyungJoo Ham , Kyungmin Park , Kukjin Kim , Krzysztof Kozlowski , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH] devfreq: Use of_node_name_eq for node name comparisons Date: Wed, 5 Dec 2018 13:50:22 -0600 Message-Id: <20181205195050.4759-6-robh@kernel.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: Chanwoo Choi Cc: MyungJoo Ham Cc: Kyungmin Park Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Rob Herring Acked-by: MyungJoo Ham --- drivers/devfreq/devfreq-event.c | 2 +- drivers/devfreq/event/exynos-ppmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/devfreq/devfreq-event.c b/drivers/devfreq/devfreq-event.c index d67242d87744..87e93406d7cd 100644 --- a/drivers/devfreq/devfreq-event.c +++ b/drivers/devfreq/devfreq-event.c @@ -240,7 +240,7 @@ struct devfreq_event_dev *devfreq_event_get_edev_by_phandle(struct device *dev, } list_for_each_entry(edev, &devfreq_event_list, node) { - if (!strcmp(edev->desc->name, node->name)) + if (of_node_name_eq(node, edev->desc->name)) goto out; } edev = NULL; diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c index c61de0bdf053..c2ea94957501 100644 --- a/drivers/devfreq/event/exynos-ppmu.c +++ b/drivers/devfreq/event/exynos-ppmu.c @@ -529,7 +529,7 @@ static int of_get_devfreq_events(struct device_node *np, if (!ppmu_events[i].name) continue; - if (!of_node_cmp(node->name, ppmu_events[i].name)) + if (of_node_name_eq(node, ppmu_events[i].name)) break; }