Re: [PATCH v2 1/4] i915: Move list_count() to list.h for broader use

2022-11-22 Thread Andy Shevchenko
On Tue, Nov 15, 2022 at 05:46:28PM +0200, Jani Nikula wrote: > On Mon, 14 Nov 2022, Andy Shevchenko > wrote: > > Some of the existing users, and definitely will be new ones, want to > > count existing nodes in the list. Provide a generic API for that by > > moving code from i915 to list.h. > >

Re: [PATCH v2 1/4] i915: Move list_count() to list.h for broader use

2022-11-15 Thread Jani Nikula
On Mon, 14 Nov 2022, Andy Shevchenko wrote: > Some of the existing users, and definitely will be new ones, want to > count existing nodes in the list. Provide a generic API for that by > moving code from i915 to list.h. I think I'd find list_length() a much more natural name for this. *shrug*

Re: [PATCH v2 1/4] i915: Move list_count() to list.h for broader use

2022-11-14 Thread Andy Shevchenko
On Mon, Nov 14, 2022 at 06:11:51PM +, Ruhl, Michael J wrote: ... > So all of the non-list_for_each code appears to be an inline. This is not true. > This which, resembles the non-list_for_each pattern is a macro? > > Just curious as to why the macro rather than inline? See above.

RE: [PATCH v2 1/4] i915: Move list_count() to list.h for broader use

2022-11-14 Thread Ruhl, Michael J
inux-ker...@vger.kernel.org; linux- >u...@vger.kernel.org >Cc: Tvrtko Ursulin ; Kevin Cernekee >; Nyman, Mathias ; Vivi, >Rodrigo ; Andrew Morton foundation.org> >Subject: [PATCH v2 1/4] i915: Move list_count() to list.h for broader use > >Some of the existing users, and definit

[PATCH v2 1/4] i915: Move list_count() to list.h for broader use

2022-11-14 Thread Andy Shevchenko
Some of the existing users, and definitely will be new ones, want to count existing nodes in the list. Provide a generic API for that by moving code from i915 to list.h. Signed-off-by: Andy Shevchenko --- v2: dropped the duplicate code in i915 (LKP) drivers/gpu/drm/i915/gt/intel_engine_cs.c |