From patchwork Mon Aug 21 15:16:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 110553 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp1429284qge; Mon, 21 Aug 2017 08:17:10 -0700 (PDT) X-Received: by 10.98.51.7 with SMTP id z7mr8797150pfz.129.1503328630273; Mon, 21 Aug 2017 08:17:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503328630; cv=none; d=google.com; s=arc-20160816; b=HbUw3CcnQCo+P3NVrkg3h0CmfsqWM2XhfAxuSBwoWOQ3CeGSzoahIXIWEMjna3vims LtBwHA1Nqe3Q8bsEfLqMurCvs849MTxl3Ni4U1jlW1nSI08ycBoEF1MIzl2vHJZB70uf z5dUYcB59SbtzxUIVViuV5O+hSM0p1jWLod3kZ/nNIs30ACCq6fym8RIzuTX1lkR0hwz ZfaC+eIY8V3Po3OqOUQvOXJsehS8iJ7/fTZ0BaOSEyuXz8TNMRsBh6AbL7Ja/SFJKp+T yaoziTRHuy0h5k4rWIXdL+Tg5NHGOpAOsFilL5kZQftwdFPPtP5GCgtDIp/Qs+UC3vuP 7F4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=fRu07O2bQFNU3KvToFTG2UKP7n4CXm+3v8jOT2gzJS0=; b=zmApGUxeK/Hiz6pCY0V7Mx/beC7SU8qIs1zcPqoF+7+RkOGWgzozP0+f7O8aObOsyE 2lbancXLyTUL9ClRGSAwxKExc8EIEXw2WYq/YtXMKxSkv2jHd1GNvr6qdBBTxDkdjWVL QsKMoaI+gMZVKTeCP9yqpsWdg5ksM7GwkWTNLwq3CnaYB1Ci1kbviwS3MP6sauOqKgb9 IGEjv9OWb6Ef+xg5ossQD1G60Z7yHmXL9w1+hACNWFPkXC6sX5lCArzPNCfCSAdBkh/M dB0Y08lrboUq7PgZR6/zZkNmcTquNWfLE9yMGNrLdUj3/GHTKfw8MLJnqPVJL+VX1lS6 45+g== 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 w10si7371389pgm.394.2017.08.21.08.17.08; Mon, 21 Aug 2017 08:17:10 -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 S1753946AbdHUPRD (ORCPT + 26 others); Mon, 21 Aug 2017 11:17:03 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:36599 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753214AbdHUPQ7 (ORCPT ); Mon, 21 Aug 2017 11:16:59 -0400 Received: by mail-oi0-f65.google.com with SMTP id p62so5690056oih.3; Mon, 21 Aug 2017 08:16:59 -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:in-reply-to :references; bh=fRu07O2bQFNU3KvToFTG2UKP7n4CXm+3v8jOT2gzJS0=; b=DdvxcS3lMVnTpJc8NPBASuKyDuUzb8MjdTMf/1admSRYngcIL73tcw8B74/4taKOnp SQW8aFZ3GOkvkyeuZxhM3idF2WbfoRnnaIV0vC7MiEj/la30Mb6c3lT9E/9K47RShmRH 2MDDDUBDbqvWOZyOC3Y6eHgXAxaiNbvU8JGu9xAfHWzihES6Qq3fX8jwZCXko4r3Js8a MpTSvCS3rK8QhZ49/FmESHOj8xs6o6kvvYKdEg6xCsw7Rw+0Ga1LoNCIXcC2Oy3J0wiz n4ck2Tgt/nm3FtqDhTGiTL3X2n635qgOhr4QKtHGgK3QKJYOufresqo9A/O3czL24Ist ZiWA== X-Gm-Message-State: AHYfb5jlfzVjL4QXNTvX+uMj+xiN2EWWOz1LtNNmm5XOYPmqlQ/BYNRF oqJR+83riYxFHMmZUWQ= X-Received: by 10.202.185.11 with SMTP id j11mr21104384oif.250.1503328618619; Mon, 21 Aug 2017 08:16:58 -0700 (PDT) Received: from localhost.localdomain (216-188-254-6.dyn.grandenetworks.net. [216.188.254.6]) by smtp.googlemail.com with ESMTPSA id q134sm4505638oic.51.2017.08.21.08.16.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Aug 2017 08:16:58 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, Michael Ellerman , linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, Frank Rowand , Benjamin Herrenschmidt , Paul Mackerras , David Laight Subject: [PATCH v2 2/5] powerpc: pseries: vio: match parent nodes with of_find_node_by_path Date: Mon, 21 Aug 2017 10:16:48 -0500 Message-Id: <20170821151651.25096-3-robh@kernel.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170821151651.25096-1-robh@kernel.org> References: <20170821151651.25096-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation to remove the full path from device_node.full_name, use of_find_node_by_path instead of open coding with strcmp. Signed-off-by: Rob Herring Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org --- v2: - rebased to linux-next and removed spurious change fro patch 1. arch/powerpc/platforms/pseries/vio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.11.0 diff --git a/arch/powerpc/platforms/pseries/vio.c b/arch/powerpc/platforms/pseries/vio.c index aa5ca74316fa..5754572deb23 100644 --- a/arch/powerpc/platforms/pseries/vio.c +++ b/arch/powerpc/platforms/pseries/vio.c @@ -1357,9 +1357,9 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node) */ parent_node = of_get_parent(of_node); if (parent_node) { - if (!strcmp(parent_node->full_name, "/ibm,platform-facilities")) + if (parent_node == of_find_node_by_path("/ibm,platform-facilities")) family = PFO; - else if (!strcmp(parent_node->full_name, "/vdevice")) + else if (parent_node == of_find_node_by_path("/vdevice")) family = VDEVICE; else { pr_warn("%s: parent(%pOF) of %s not recognized.\n",