From patchwork Mon May 17 13:59:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 440113 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1147313jac; Mon, 17 May 2021 07:35:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfpszvr+F5FSj/Q/ihcTakVW2pwKIHYU1cPNNySeDaK9r8q/JdXOHVy1TmPw5rtWKKcxOg X-Received: by 2002:a05:6402:2548:: with SMTP id l8mr417352edb.208.1621262117041; Mon, 17 May 2021 07:35:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621262117; cv=none; d=google.com; s=arc-20160816; b=VmLJMtAVhbfkm5fFW24kkctWSzHe8vkkfKXYukoNmDvbym5Ay3I+Bg2fmxxIoKGrHQ mUba+4g1h9bS0MNK/MxT8WjI6TXzw1UUVz7PwcMk4fUEsWiKffxoZQwNNdc1tdhmMfdk B0jxq9DIIAekr4GIHWMRU1YbN0pktYttRLTervKSVDSxJQQ/PkrHfF4t7aAUfe6IIIyo Rw8+heMiZExD81CRJZLYHpde3dpDUxW3JPaZ1XEnCk4brreD4OH1GzkKZ9/DPh1nudps NK+Rg7+h8iKi1jSAoeVn9YgGcTcag/HeXpjjyMzQDJDc2c4IjV8cHlqLqY9lOPr16Rvc yFPg== 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=Vuvr6Cdaiaztz+BPe566d+/Vu2kAAZi88mJ8mGDnTGGbit9Wd8FA7DsFZG3jv4vfAc E1mRhgoJjsLYnuKyRmrUhvWqm31yLPnmx1c8iI34bLgXzIgbWS/yfDRWPuOtdwL0QnNG A7tfw8D0HF1u3PEFVoxuXnQuqDA7TUbly233MM4D028GZWOD2dvdRW/nSrWWdMYp5PcI d3FOl2juXp8Nr/hpOeRDmaAQhP1Da2VDtuGXWiq8XUr2P1YDUZpXimgaBbJGvR3MGEun Jd3/W9xULBiodzJwuPEsu+RLjQRwiJzjhMpH+cnB970s3sG4/GEk3QGldgLO96rhyn00 o40A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rKth6uYX; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 j5si14305159ejd.355.2021.05.17.07.35.16; Mon, 17 May 2021 07:35:17 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=rKth6uYX; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S239921AbhEQOgN (ORCPT + 12 others); Mon, 17 May 2021 10:36:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:43890 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240111AbhEQOdy (ORCPT ); Mon, 17 May 2021 10:33:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B7D0761928; Mon, 17 May 2021 14:16:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260992; bh=b3RxAnqZyvSpqfjl9rUegzuE+IJ21GBgWwQc2A7a/zk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rKth6uYXnipRKcS4GnhoTnKZMqvregyVuiCOP1LNh15IpR4JjAffJ7pQTeH3Aa5fz M7TQI0sPl9taJ4X5CI/jlb5OJTZhU36OrqXRv3w9w3BL+PYWEfcnhEI2Pe2hMIrbmc TS3CBi+V+/JrcsisAa9YdkwnqH5Kub4BTJXzz7ps= 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.11 051/329] coresight: Do not scan for graph if none is present Date: Mon, 17 May 2021 15:59:22 +0200 Message-Id: <20210517140303.776297388@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.043055203@linuxfoundation.org> References: <20210517140302.043055203@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@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(+) -- 2.30.2 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)