i915: Move list_count() to list.h for broader use
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 23 Nov 2022 14:48:58 +0000 (16:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Nov 2022 07:56:09 +0000 (08:56 +0100)
commita9efc04cfd05690e91279f41c2325c46335c43ef
treef4cb63d94e82ec9f5138f43ffaaf0098e9bc1f5b
parent944fe915d00d3cb1bacb1e77cabfb6dc82e6f8b8
i915: Move list_count() to list.h for broader use

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.

Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221123144901.40493-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/i915/gt/intel_engine_cs.c
include/linux/list.h