[PATCH v2 0/3] list: Add hlist_count_nodes()

Pierre Gondois posted 3 patches 1 year, 11 months ago
drivers/android/binder.c  |  4 +---
drivers/md/bcache/sysfs.c |  8 +-------
include/linux/list.h      | 15 +++++++++++++++
3 files changed, 17 insertions(+), 10 deletions(-)
[PATCH v2 0/3] list: Add hlist_count_nodes()
Posted by Pierre Gondois 1 year, 11 months ago
v2:
- Add usages of the function to avoid considering it as dead code.
v1:
- https://lore.kernel.org/all/20240103090241.164817-1-pierre.gondois@arm.com/

Add a generic hlist_count_nodes() function.

This function aims to be used in a private module. As suggested by
Marco, having it used would avoid to consider it as dead code.
Thus, add some usages of the function in two drivers.

Pierre Gondois (3):
  list: Add hlist_count_nodes()
  binder: Use of hlist_count_nodes()
  bcache: Use of hlist_count_nodes()

 drivers/android/binder.c  |  4 +---
 drivers/md/bcache/sysfs.c |  8 +-------
 include/linux/list.h      | 15 +++++++++++++++
 3 files changed, 17 insertions(+), 10 deletions(-)

-- 
2.25.1
Re: [PATCH v2 0/3] list: Add hlist_count_nodes()
Posted by Andy Shevchenko 1 year, 11 months ago
On Thu, Jan 04, 2024 at 05:49:32PM +0100, Pierre Gondois wrote:
> v2:
> - Add usages of the function to avoid considering it as dead code.
> v1:
> - https://lore.kernel.org/all/20240103090241.164817-1-pierre.gondois@arm.com/
> 
> Add a generic hlist_count_nodes() function.
> 
> This function aims to be used in a private module. As suggested by
> Marco, having it used would avoid to consider it as dead code.
> Thus, add some usages of the function in two drivers.

With or without a nit-pick being addressed,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH v2 0/3] list: Add hlist_count_nodes()
Posted by Marco Elver 1 year, 11 months ago
On Thu, 4 Jan 2024 at 17:50, Pierre Gondois <pierre.gondois@arm.com> wrote:
>
> v2:
> - Add usages of the function to avoid considering it as dead code.
> v1:
> - https://lore.kernel.org/all/20240103090241.164817-1-pierre.gondois@arm.com/
>
> Add a generic hlist_count_nodes() function.
>
> This function aims to be used in a private module. As suggested by
> Marco, having it used would avoid to consider it as dead code.
> Thus, add some usages of the function in two drivers.

Whether or not it's used in a private module is probably irrelevant
from an upstream perspective.

But this is a reasonable cleanup, and at the same time adds API
symmetry with the already existing list_count_nodes().

> Pierre Gondois (3):
>   list: Add hlist_count_nodes()
>   binder: Use of hlist_count_nodes()
>   bcache: Use of hlist_count_nodes()
>
>  drivers/android/binder.c  |  4 +---
>  drivers/md/bcache/sysfs.c |  8 +-------
>  include/linux/list.h      | 15 +++++++++++++++
>  3 files changed, 17 insertions(+), 10 deletions(-)

For the series:

Acked-by: Marco Elver <elver@google.com>

Thanks.
Re: [PATCH v2 0/3] list: Add hlist_count_nodes()
Posted by Marco Elver 1 year, 11 months ago
On Thu, 4 Jan 2024 at 18:16, Marco Elver <elver@google.com> wrote:
> On Thu, 4 Jan 2024 at 17:50, Pierre Gondois <pierre.gondois@arm.com> wrote:
> >
> > v2:
> > - Add usages of the function to avoid considering it as dead code.
> > v1:
> > - https://lore.kernel.org/all/20240103090241.164817-1-pierre.gondois@arm.com/
> >
> > Add a generic hlist_count_nodes() function.
> >
> > This function aims to be used in a private module. As suggested by
> > Marco, having it used would avoid to consider it as dead code.
> > Thus, add some usages of the function in two drivers.
>
> Whether or not it's used in a private module is probably irrelevant
> from an upstream perspective.
>
> But this is a reasonable cleanup, and at the same time adds API
> symmetry with the already existing list_count_nodes().
>
> > Pierre Gondois (3):
> >   list: Add hlist_count_nodes()
> >   binder: Use of hlist_count_nodes()
> >   bcache: Use of hlist_count_nodes()
> >
> >  drivers/android/binder.c  |  4 +---
> >  drivers/md/bcache/sysfs.c |  8 +-------
> >  include/linux/list.h      | 15 +++++++++++++++
> >  3 files changed, 17 insertions(+), 10 deletions(-)
>
> For the series:
>
> Acked-by: Marco Elver <elver@google.com>

Btw, there doesn't appear to be a clear maintainer or tree for
include/linux/list.h. Since there have been several Acks/Reviews by
now, did you have a particular tree in mind?
Perhaps Andrew (+Cc) can help.

Thanks,
-- Marco