From patchwork Tue Jul 25 21:44:24 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: 108713 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp91320obm; Tue, 25 Jul 2017 14:44:47 -0700 (PDT) X-Received: by 10.99.175.1 with SMTP id w1mr20672842pge.390.1501019085182; Tue, 25 Jul 2017 14:44:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501019085; cv=none; d=google.com; s=arc-20160816; b=EegzQcA8w8ql49F/QtdMQkrHhyPU6ReKIy8lhB34sqCKr/fUWwtsffMDxcZY5izC/U FVe+yXb1oNQrOiUp1y4OcXMNh6HKhF554P+ufeoGETiByD8WWK1CXKmE1vGFuQ6KPvYu b5S0ZBkGCeiCmKV3K6PB4kGzA4V3U4Jwd/gxV6VN6TmREGoFKNILhfPIQ3Fp4Mm4SJsl gW2r+D6ucw4c/ONUH5FvAoY3MeKTsJ9d0SWwRY4LonI/sD/mUhmdBe2p1cIPZMlmhdrr 1w4jbH7MfHckSbvm9Loz0zv3IoD+aXfTMG+/6On2FhTo4RUtIxgxoq8ljFrKTWPlp6D5 6u3w== 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=QhR+ZMBIdCXrBDeDeJ8kWa4i8ITHWt9ubpz+hGdBkVA=; b=K5SsW4TdhB9YA/uAxJZ/6F7R88/fuQco5diDaI3Djua0Bd1XndeS2MKVQzmxsAATVU Yuk/oC+G/P9V9n1i/T1FcpTMsnph9IvvIUQ/IrtFYJHFOkFawfxiUU431tzJapninPgi JLzGkuKrl8samluxK+4zex+qjoPrF1Q6PFUkrfVuDO8dV055xDTB/0wTOodIgSq/ftDq XB6SCxyWprvIJhIBPYKim76IW9Pfk/3QzX6MgaG+BoIL8+gQ28Jc4ctNUIe2u6OkTts8 ANHUfvWTlQnCEThIPR6PaCp87DN1pNotold90nUAQh0GWvkPo5oK5RDn1oRzJ4KhwWbx CA+Q== 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 v9si8856492pge.252.2017.07.25.14.44.44; Tue, 25 Jul 2017 14:44:45 -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 S1751592AbdGYVoj (ORCPT + 26 others); Tue, 25 Jul 2017 17:44:39 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:35365 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750974AbdGYVog (ORCPT ); Tue, 25 Jul 2017 17:44:36 -0400 Received: by mail-yw0-f193.google.com with SMTP id l82so4120183ywc.2; Tue, 25 Jul 2017 14:44:36 -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=QhR+ZMBIdCXrBDeDeJ8kWa4i8ITHWt9ubpz+hGdBkVA=; b=HnvlkKjVCEjK99NgSdFJjoEFK0faD8Y7dJWjnNGvm0IlCfEL5cnd6oJuKlwTZb8GaQ ES5Uu9qJkbOi4C36ITJvRH3tSQdNLlfddVh4iBXSWsH9Cu07I/btpU43ryWmGpIbc32M PjThzoMeXlBc+87n3raq4xiHxGdygaz/n0SgWGw7sUHIazlOC5TixjTPuMZW7lCac0S6 H5WSUuvH29VGDAPGzdmUfkMSysXfcaIZzLKpdRP9PzViyI/0FVddINrNr0u20worwHoP yMm3fVns8r0Ke0TzvR9fahBh7kL4uJ92a7qq3HXWGxYkuaFdXOrC3VEfmi1xp3hacwwW dJ4g== X-Gm-Message-State: AIVw112PJgPGyTo06EhlmqNY5yf0bDubhhAeT73B4vceifSwcJpAfHs2 /o5kL5Cz3MOGRijcgPU= X-Received: by 10.13.246.199 with SMTP id g190mr9798057ywf.175.1501019075760; Tue, 25 Jul 2017 14:44:35 -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 204sm2386383ywx.35.2017.07.25.14.44.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jul 2017 14:44:35 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, Frank Rowand , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Subject: [PATCH 1/4] powerpc: pseries: vio: match parent nodes with of_find_node_by_path Date: Tue, 25 Jul 2017 16:44:24 -0500 Message-Id: <20170725214427.25768-2-robh@kernel.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170725214427.25768-1-robh@kernel.org> References: <20170725214427.25768-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 --- 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 3201feb6d32b..28a9505e4919 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",