Re: [PATCH v2 2/3] binder: Use of hlist_count_nodes()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 04, 2024 at 05:49:34PM +0100, Pierre Gondois wrote:
> Make use of the newly added hlist_count_nodes().
> 
> Signed-off-by: Pierre Gondois <pierre.gondois@xxxxxxx>
> ---
>  drivers/android/binder.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> index 92128aae2d06..f9ca4d58d825 100644
> --- a/drivers/android/binder.c
> +++ b/drivers/android/binder.c
> @@ -6077,9 +6077,7 @@ static void print_binder_node_nilocked(struct seq_file *m,
>  	struct binder_work *w;
>  	int count;
>  
> -	count = 0;
> -	hlist_for_each_entry(ref, &node->refs, node_entry)
> -		count++;
> +	count = hlist_count_nodes(&node->refs);
>  
>  	seq_printf(m, "  node %d: u%016llx c%016llx hs %d hw %d ls %d lw %d is %d iw %d tr %d",
>  		   node->debug_id, (u64)node->ptr, (u64)node->cookie,
> -- 
> 2.25.1
> 

Looks good to me!

Acked-by: Carlos Llamas <cmllamas@xxxxxxxxxx>




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux