Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5659633pxu; Wed, 23 Dec 2020 02:05:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwERsxcxmuhDJekca/X73yGLtiYjgBc3JaEToZ4sbU2BhJv0WQX3OysNx4D051UcpGJLI+m X-Received: by 2002:a17:907:447d:: with SMTP id oo21mr23408354ejb.367.1608717934439; Wed, 23 Dec 2020 02:05:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608717934; cv=none; d=google.com; s=arc-20160816; b=uxc/wrMIm2Hgt9wQzZ55hHh3hDgrAIpnrw3YMzpuFO5eO/GuUKEpw4Hbc25Njc3Sly 5mCEUlCywAfjx+Kh2jpgTKpFpws+K2I+qhS24AIei6VVkcM/wqY+rQAb9XkiUAw1gNW1 pYVIvumBjmqLQ2U9FzrqV+RPcvbSGXyhmfAplCQE9B3djDgNZFntqkzZ00lceW+RCUNp ZopVzkx0ecv1ZOvO5P1+k6NqfFZxTF5MtcxL/1HG3IUD+kWcoXzzt8SInhF0WeeWCJCK BxDoxowZ7ake4XdQHq46krVgheCQwMA0SgkzjDWUr9dzET+HeLrTM06chpFg3ex97nXk bgKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=DiBR2GT5jQk7QivKLMIwrpgKB/HD0oW8RUQj4uM4St4=; b=o2AXv51vutBBCw5f+7dCADR98IwMr9XseQzqThDD3jIB4BJB72r+LpJjTxhfUU8Ccx n5GG2z2mh0ghhgdL6AORkbCsBVawcjZGk1I6Mmwq0S/u5wmGF/Y4DZz/iByPTmL/9jrW F+K4kMuDbr2IF6i/u2Rl9k2M9KxH9VaACtvzATmveAyaGis27mDFomZZ+b0pE7lsBP3B GMnBBAN6w7DfnNqcItAEhc7vdXmOJWzoi3kEyUkOwXQzB32M5fENTGLzDhb3X7QF8caM nwd+c/J6gD3Plb8n/wLw0kRuzAttn1R98Xh8efcLmc7DqnS4nAjL9ulbsYdqncFtMSMr sYIw== 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 m7si10833146eji.498.2020.12.23.02.05.12; Wed, 23 Dec 2020 02:05:34 -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 S1728329AbgLWKEd (ORCPT + 99 others); Wed, 23 Dec 2020 05:04:33 -0500 Received: from foss.arm.com ([217.140.110.172]:47940 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbgLWKEd (ORCPT ); Wed, 23 Dec 2020 05:04:33 -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 8274A11D4; Wed, 23 Dec 2020 02:03:47 -0800 (PST) Received: from p8cg001049571a15.blr.arm.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4D55C3F718; Wed, 23 Dec 2020 02:03:44 -0800 (PST) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org Cc: linux-kernel@vger.kernel.org, Anshuman Khandual , Mathieu Poirier , Suzuki K Poulose , Mike Leach , Linu Cherian Subject: [PATCH 02/11] coresight: Do not scan for graph if none is present Date: Wed, 23 Dec 2020 15:33:34 +0530 Message-Id: <1608717823-18387-3-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1608717823-18387-1-git-send-email-anshuman.khandual@arm.com> References: <1608717823-18387-1-git-send-email-anshuman.khandual@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Suzuki K Poulose 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. Cc: Mathieu Poirier Cc: Mike Leach Signed-off-by: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- 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 3629b78..c594f45 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.7.4