[PATCH v7 1/9] of: property: add of_graph_get_next_port()

Sakari Ailus sakari.ailus at iki.fi
Mon Oct 21 09:42:39 UTC 2024


Dead Morimoto-san,

On Wed, Oct 09, 2024 at 01:44:48AM +0000, Kuninori Morimoto wrote:
> diff --git a/drivers/of/property.c b/drivers/of/property.c
> index 11b922fde7af..6a5d27dd0c64 100644
> --- a/drivers/of/property.c
> +++ b/drivers/of/property.c
> @@ -630,6 +630,43 @@ struct device_node *of_graph_get_port_by_id(struct device_node *parent, u32 id)
>  }
>  EXPORT_SYMBOL(of_graph_get_port_by_id);
>  
> +/**
> + * of_graph_get_next_port() - get next port node.
> + * @parent: pointer to the parent device node, or parent ports node
> + * @prev: previous port node, or NULL to get first
> + *
> + * Parent device node can be used as @parent whether device node has ports node or not.

This line should be wrapped, no reason to have it longer than 80 chars.

Maybe this could be done while applying?

> + * It will work same as ports at 0 node.
> + *
> + * Return: A 'port' node pointer with refcount incremented. Refcount
> + * of the passed @prev node is decremented.
> + */

-- 
Kind regards,

Sakari Ailus


More information about the dri-devel mailing list