Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp263070pxj; Tue, 18 May 2021 02:49:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwztUxpZIjlt7wE671hkhJKdICPuiq56aokqafrg6hIQcrzRE5P39lPfdTwar53kdeT/Gpw X-Received: by 2002:a17:906:170d:: with SMTP id c13mr4985963eje.491.1621331393924; Tue, 18 May 2021 02:49:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621331393; cv=none; d=google.com; s=arc-20160816; b=BfP1mp3cHy3jIzcYdW+AldDhHVCdx/YfWzyZbRU2k7b2DuC+EcHBgqgtKwJ547bGYn Pv2huEcHHnw3oTvbWWZYoz0o4Z04IZBNglMTjtkcZ4OLOcYt0q+v6E5u4Jux39hdC8um XBE6MSFYfnUmNMo971yzOU8mS+IMkquz26Q5JFvgHVvcv6rjoRet/wzc13QQPjUnIKQp 5v99gflLAnBELMAHg1GUw4UzLozjlhqHhNIMTUDtOyTIZk4/ryv5cRvBY4x2HoCjbfdq ukMpVWL97TyDzQCjt+y4eyxDsu+0181Yk+cOyqcHHWwApMxaLHjByfJg3tf3ptmJ7udt KqEg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JWrNySf9rUTwhVaHUj0w9u47JeX5ZBUB68S6JDWi50M=; b=BBudvTKQmQWNwziu9F+vRZM9tubUXaDrm6Z9o70PEzbYx6Ih3QDsWnPaqPwZ3zu0zg 5fBVXtkj9R5MWBjj1fv92hh/sLkV/CxkBpTpuv2RdPjvzPOZJum9WV0XLbaDh71ySw+D bMCy/GtmObpYWbUtUOKBgMqyjnqpMGQZ2uKRjaelzSWn3AKtSxoqltVzLnyGpAZwmAD8 4XsWHQ86EK1w4yVFeKlemw3118N2i1uLBPbFjlN94FImwqDFF7NZBFVT9NcLkskSZJ4V utdJdq55E0Qvn8yws8OjILBpNraZ35a2Gj+eiGMKwtGAu3ZVrshehBHDuHf+MbCzkCVQ 6cmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=a6RYjBU+; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h7si19084356edb.471.2021.05.18.02.49.27; Tue, 18 May 2021 02:49:53 -0700 (PDT) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=a6RYjBU+; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240628AbhEQPKl (ORCPT + 99 others); Mon, 17 May 2021 11:10:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:34144 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242123AbhEQPBs (ORCPT ); Mon, 17 May 2021 11:01:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 07B5F61361; Mon, 17 May 2021 14:27:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621261636; bh=b3RxAnqZyvSpqfjl9rUegzuE+IJ21GBgWwQc2A7a/zk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a6RYjBU+hmPSXzcCvXevnZu9iYNCAGKfiRRjVqU2KBBpHbTHuZIVK10YWDJFsvcw2 fRWTuL/w8HQtXtyBqjhm5vr4zdGQAOZFmsw3XLXpWoxRH/mbYJL/NFRo5tK4cpXHSy uR3a77mtyPS81LHVqHwKQHQVuYYVZD97kE+CUgzU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mike Leach , Leo Yan , Suzuki K Poulose , Mathieu Poirier , Sasha Levin Subject: [PATCH 5.10 043/289] coresight: Do not scan for graph if none is present Date: Mon, 17 May 2021 15:59:28 +0200 Message-Id: <20210517140306.649036604@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Suzuki K Poulose [ Upstream commit 2b921b671a8d29c2adb255a86409aad1e3267309 ] 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 Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210405164307.1720226-11-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier Signed-off-by: Sasha Levin --- 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.30.2