Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp208691pxb; Tue, 2 Feb 2021 03:14:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwGOSxXAPPFUVRTM7CXeXZt1sL64W/ukzwSX/CBOZ7LiAsef2kbhBAPr/U0mcqii/YQpFD X-Received: by 2002:aa7:d8c9:: with SMTP id k9mr6906114eds.366.1612264476319; Tue, 02 Feb 2021 03:14:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612264476; cv=none; d=google.com; s=arc-20160816; b=Qtyk3kJiDLNmYm8E42BAKxRCJsrGURht14uPyjeoH3dTr/JHjvBTJZxb2vjIQmCv5a XJq5cRA3SUXbLr6g3BBO6HQwAckwe+Cuyelr/Yrb/fhSxPxSygGYCJ1GgX7+Kpm0NgC5 g25fZVv9mI85yuu4dcv0YgOfTjiLd/aCypVl2Tdf9ew4gBmGMlCfS2ch20Kj6HSJ8RRM Z/K2KkNuIGk5UxVA0nQ/BIxZk9nSGP4a42XurDicXNzrbkQ8PpNVLq5ePJq28OPO9DDR 4JwqVOpIeBFpY9k4Zpf/CuCYDF/7fuj7LPS+y0TztbLs9eW/nGxajge9HzLcrvU7OKcz YC/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Ovhx5C9K0mtaqY6XtiS1biDzAm8u7MdzCszIDE33A1k=; b=ZcvjorCZHJcVV9Ltl7ePWH60P43ktOi2dERHgytVS6TEEoxrf56LIaKahK4XRl4d+R LStb42Td4AYTbf1HTLthE6wP9HmGmB1oRUNtnr2Hz4kmPDf/E0e6E8xP0/GiSFtQKlm6 KZYdeNhFn/b9IIXU6hmDugDqZ+kb/78OH2sXXEn8J+lBiLsra+KbV4cQ0CHCb0RS7BKX Z0pMTbzLh3QdDgDZ80E6Eq6vUf79k75DMpizsDk6brjAacapMmJR8CDtkptkHbodqF+d luIlBDvpLC06JjMU2/MLzq4/JNDH/5h9GcoatoBSu+MfRH0KS3TQ0RLKabo8tpHxFM1J 64fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BrCtIu1R; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u13si12436796edp.96.2021.02.02.03.14.11; Tue, 02 Feb 2021 03:14:36 -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; dkim=pass header.i=@linaro.org header.s=google header.b=BrCtIu1R; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229838AbhBBLLW (ORCPT + 99 others); Tue, 2 Feb 2021 06:11:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229680AbhBBLKx (ORCPT ); Tue, 2 Feb 2021 06:10:53 -0500 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0894AC06174A for ; Tue, 2 Feb 2021 03:10:13 -0800 (PST) Received: by mail-wm1-x335.google.com with SMTP id 190so2033085wmz.0 for ; Tue, 02 Feb 2021 03:10:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ovhx5C9K0mtaqY6XtiS1biDzAm8u7MdzCszIDE33A1k=; b=BrCtIu1R36f/I7pRSjgLygk181SAV9U7Yxrap3fUhshC7UlJ1zyjoFRLngg6VVnBO1 6xwVVpSBlzFRbAshELn3LdihVafMR88ZBQdD1Lmy+/wF6QnWFCvWeMZLGGfWbLykeD+O RB75SGuCpXHeknNGBmpJNtRxlefkGz7rqmKZqAzRgjxG3TmvTV/OHb65s4K5sH+9z+ap VFXFa90fzPr+aLdJmf+qjQ9LGr+aIbyRV5FkoPuo+LXlvqfaZMfs0xwHkvrCMd4GdnnN ULwzsKGwJO+SEuDI0CJB5gnr4SVv6ibZb8/Oa5Mn9ac2pnS2hlGSzgBVD6tSFvf69x4C uZzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ovhx5C9K0mtaqY6XtiS1biDzAm8u7MdzCszIDE33A1k=; b=bEI5WpPbu0MVDZUoZ96LtVET4VPgL5sFPlBYIJQK9Qykquk2Ul2xFpqMSplDcNUR0C kRPIathEQ9Zy9wySO+uRi5g7NcKc72zL6jgpusolbtBv1e2+Go6Pz7ipQticEHJ9FfHM fv8iaSHp6rgvxtCTfzRbtjoX7YnoHNIQNp5G9tYgBP1IHAtZA0GwHPxZkzUV2tOyMJka eYVilXOZb+2/rxHFWAM9vcD38Doo1DivjbLdQywp26dR8djDHe3XrRkqXPtiFu0isyyb fvLSbPwIbVsdub5NbktmbpRDAvIIVtFlDcb8cCUiiNT7gXmRCYSlxeDIoC+ZEJl3DYZj R7ng== X-Gm-Message-State: AOAM531ZSXdwkH2AvwR2Div4r5SLouspOfcaVjiOqsK2Qn6bF0Odlgqu KS0iJmtKOeBmjFabKXr5Owm8YcWvtO7VfNL3IYAH6cn1Ck8= X-Received: by 2002:a05:600c:28b:: with SMTP id 11mr3101421wmk.98.1612264211771; Tue, 02 Feb 2021 03:10:11 -0800 (PST) MIME-Version: 1.0 References: <1611737738-1493-1-git-send-email-anshuman.khandual@arm.com> <1611737738-1493-3-git-send-email-anshuman.khandual@arm.com> In-Reply-To: <1611737738-1493-3-git-send-email-anshuman.khandual@arm.com> From: Mike Leach Date: Tue, 2 Feb 2021 11:10:01 +0000 Message-ID: Subject: Re: [PATCH V3 02/14] coresight: Do not scan for graph if none is present To: Anshuman Khandual Cc: linux-arm-kernel , Coresight ML , Mathieu Poirier , "Suzuki K. Poulose" , Linu Cherian , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ansuman, On Wed, 27 Jan 2021 at 08:55, Anshuman Khandual wrote: > > 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; The problem here is that you are masking genuine errors. The solution is to either call this only if the device type is one that ports are not required - i.e. ETE, or upgrade the .dts bindings for the rest of the ETM devices to yaml so that the ports requirement is checked and validated there. Regards Mike > do { > ep = of_graph_get_next_endpoint(node, ep); > if (!ep) > -- > 2.7.4 > -- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK