diff options
author | Pierre Gondois <pierre.gondois@arm.com> | 2024-01-04 17:49:34 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-02-23 00:38:51 +0100 |
commit | 3fa2601e4a1fe3ec8068f7bee41a13afa061f6ae (patch) | |
tree | d0e8164839243254754be1b9d4879bb1b4ff5dc5 | |
parent | list: add hlist_count_nodes() (diff) | |
download | linux-3fa2601e4a1fe3ec8068f7bee41a13afa061f6ae.tar.xz linux-3fa2601e4a1fe3ec8068f7bee41a13afa061f6ae.zip |
binder: use of hlist_count_nodes()
Make use of the newly added hlist_count_nodes().
Link: https://lkml.kernel.org/r/20240104164937.424320-3-pierre.gondois@arm.com
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Acked-by: Carlos Llamas <cmllamas@google.com>
Acked-by: Marco Elver <elver@google.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Coly Li <colyli@suse.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Joel Fernandes (Google) <joel@joelfernandes.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Kent Overstreet <kent.overstreet@gmail.com>
Cc: Martijn Coenen <maco@android.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Todd Kjos <tkjos@android.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | drivers/android/binder.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c index eca24f41556d..bad28cf42010 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -6086,9 +6086,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, |