Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp664753pxb; Thu, 25 Feb 2021 11:47:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJyOuVEcjYPBia3aq5m7FxGPNhMAaq89c/7YSPjSHOTu/WEfulFWM7od4tlsVL0O5Z843if0 X-Received: by 2002:aa7:d1cf:: with SMTP id g15mr4726583edp.270.1614282468988; Thu, 25 Feb 2021 11:47:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614282468; cv=none; d=google.com; s=arc-20160816; b=lwx1o9VbPgakZb1VQYgW4gztwAtSOmlfveAmZ5BOJ6GNx8zaL4/1FuDiqVBXnJp7Gf D1FAdPnNtIFSMDw/1TJrZIc4lqsxKxVvGHP2UV3JD1r+KK5LaH/gdwKHcSmWY6cF4cvf whwXUohpc8wj6eUjSWr2BVwPLNWBbe5Nybrt2UHDpkVxuEAczvwGle4RnmNB2vKmyOv9 5sOr7Jgkfq7JaK1vSbRBK9r28eaLqtsqO/G7+Cnt5NXWdVOJ5psgv6ejGLD+Ga7yETMl pwVxFHNxifrrfBrUM5JKVE9sHwGx/omO9tlypl7+KkZikhg5Gz6+U847kR2D02Cg2GZ1 NCTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=LzE+cgoI/THlABmuL0BgMQTSOJmcepwNAlgUVKkd1qw=; b=avok6fpe2x8GQYoiQT436w1rY9+Vn/K+8O6UzMS3F9utM0lDy8P4pFjim2rzAWv3kY AUUQT5jXG2uWINXkiL9Elt9e/KWAebt+e0zdoX2FfT7Axzn0vVUUB8sxQ/HMG1NEvJoM BKDUhMobX7uLRZoPGOWBF3/SPihOCW0AwSp38eLXqUp2BVo8JtXVo5QBnB5Txx7EHSi+ GKJa+/Q53gPhJt9v7IwN4Uuy6YePuczVYKOiXhuJBxNv7Tqrvw3CoQk+FvNtzWizpwZB O8278YJqUVzIpDUxQokbrNCswS3aSMqAZnBxYEDebmpNS/lxqW1sgc8xwefd3g0JDu93 /Hxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s13si4021231edj.330.2021.02.25.11.47.26; Thu, 25 Feb 2021 11:47:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234058AbhBYTq0 (ORCPT + 99 others); Thu, 25 Feb 2021 14:46:26 -0500 Received: from foss.arm.com ([217.140.110.172]:48426 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234864AbhBYTje (ORCPT ); Thu, 25 Feb 2021 14:39:34 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2E6351474; Thu, 25 Feb 2021 11:36:15 -0800 (PST) Received: from ewhatever.cambridge.arm.com (ewhatever.cambridge.arm.com [10.1.197.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2C2F83F70D; Thu, 25 Feb 2021 11:36:14 -0800 (PST) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, mathieu.poirier@linaro.org, mike.leach@linaro.org, anshuman.khandual@arm.com, leo.yan@linaro.org, Suzuki K Poulose Subject: [PATCH v4 11/19] coresight: Do not scan for graph if none is present Date: Thu, 25 Feb 2021 19:35:35 +0000 Message-Id: <20210225193543.2920532-12-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20210225193543.2920532-1-suzuki.poulose@arm.com> References: <20210225193543.2920532-1-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If a graph node is not found for a given node, of_get_next_endpoint() will emit the following error message : OF: graph: no port node found in / If the given component doesn't have any explicit connections (e.g, ETE) we could simply ignore the graph parsing. As for any legacy component where this is mandatory, the device will not be usable as before this patch. Updating the DT bindings to Yaml and enabling the schema checks can detect such issues with the DT. Cc: Mike Leach Cc: Leo Yan Reviewed-by: Mathieu Poirier Signed-off-by: Suzuki K Poulose --- drivers/hwtracing/coresight/coresight-platform.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/hwtracing/coresight/coresight-platform.c b/drivers/hwtracing/coresight/coresight-platform.c index 3629b7885aca..c594f45319fc 100644 --- a/drivers/hwtracing/coresight/coresight-platform.c +++ b/drivers/hwtracing/coresight/coresight-platform.c @@ -90,6 +90,12 @@ static void of_coresight_get_ports_legacy(const struct device_node *node, struct of_endpoint endpoint; int in = 0, out = 0; + /* + * Avoid warnings in of_graph_get_next_endpoint() + * if the device doesn't have any graph connections + */ + if (!of_graph_is_present(node)) + return; do { ep = of_graph_get_next_endpoint(node, ep); if (!ep) -- 2.24.1