lkml.org 
[lkml]   [2021]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v6 10/20] coresight: Do not scan for graph if none is present
    Date
    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 /<node_name>

    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 <mike.leach@linaro.org>
    Cc: Leo Yan <leo.yan@linaro.org>
    Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
    Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
    ---
    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.24.1
    \
     
     \ /
      Last update: 2021-04-05 19:11    [W:4.968 / U:0.236 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site