Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp519822pxb; Wed, 27 Jan 2021 13:43:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJyDLv4TRuSjwKCiFjAfOh19LzW810znFaL0882GiXP1nfhg8bYZvKh93Dc18K0r1DZyyAdX X-Received: by 2002:a50:b223:: with SMTP id o32mr10912401edd.79.1611783820664; Wed, 27 Jan 2021 13:43:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611783820; cv=none; d=google.com; s=arc-20160816; b=pZXpZkeJ4LHHZouAF9y/4vhF752F1Rppx7P0YytUFL1JRrieJ8XX3JgNzVyIfYUCcK DojdQC0cSISvbWsLZXVGHlzg4QrZ8LAObjGY479AOBjWqti8P5BQRKLypP+KJ8ke5b3I G8q0iBm/JGSIfnKs49LOAc8KQe6vgxi4IC3czH7/kVKwo5vey+yC0vP4ye7nk1iyEYsA SEoVRT7ritwhFmD/hT2ZnZifEBrhHSjy1xVGwsKDWq52GZwgkQBaNPiaw20mpcCbQM9v iKXs79cqw8cpXkNJ2lrykCdVfCA+PeusImNpEeOj4XC8zYcLBIMNpzHFM/6jy16KKS9R hXMQ== 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=W8jam628DKdV4kso16Q0gDL3iwMaz+uBlwnJdQw/S5x//ENWZs4iJCg0dqgh7AMgxK zhXMLnz+fKaQQOZdbeu3WwGFmkMxRTdOgEW3dUc1709XnuA8GvUDSIwAWmS/A5i6OAFL KSgcwaUo1XGkiW0mnCXaPa2PAa3NgqMvNq+STCpf/qvgyCpQ43d+w171QQsB8fQq8qkC p/CBggG2Ge/OqY1UztVnv0QQWHE9caR1SyrdCvKD6DltNM/AJyhqUk90+1eV1lRy9L+8 qOZxjV+BdnJTtbybihZ4R3PeIxS3ElCjALI/peCgb+9p+b175eJvN+1wc0d7xNdms5vY Xv9w== 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 lv10si1464573ejb.505.2021.01.27.13.43.15; Wed, 27 Jan 2021 13:43:40 -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 S232554AbhA0I7z (ORCPT + 99 others); Wed, 27 Jan 2021 03:59:55 -0500 Received: from foss.arm.com ([217.140.110.172]:60920 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233497AbhA0I4Q (ORCPT ); Wed, 27 Jan 2021 03:56:16 -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 C46B1139F; Wed, 27 Jan 2021 00:55:29 -0800 (PST) Received: from p8cg001049571a15.arm.com (unknown [10.163.91.246]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1D63D3F66B; Wed, 27 Jan 2021 00:55:26 -0800 (PST) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org Cc: mathieu.poirier@linaro.org, suzuki.poulose@arm.com, mike.leach@linaro.org, lcherian@marvell.com, linux-kernel@vger.kernel.org, Anshuman Khandual Subject: [PATCH V3 02/14] coresight: Do not scan for graph if none is present Date: Wed, 27 Jan 2021 14:25:26 +0530 Message-Id: <1611737738-1493-3-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611737738-1493-1-git-send-email-anshuman.khandual@arm.com> References: <1611737738-1493-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