Re: [PATCH RFC net-next v3 3/8] netconsole: Helper to count number of used entries

From: Simon Horman
Date: Thu Jan 30 2025 - 05:37:43 EST


On Fri, Jan 24, 2025 at 07:16:42AM -0800, Breno Leitao wrote:
> Add a helper function nr_extradata_entries() to count the number of used
> extradata entries in a netconsole target. This refactors the duplicate
> code for counting entries into a single function, which will be reused
> by upcoming CPU sysdata changes.
>
> The helper uses list_count_nodes() to count the number of children in
> the userdata group configfs hierarchy.
>
> Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>