list: introduce list_is_head() helper and re-use it in list.h
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 30 Dec 2021 09:29:07 +0000 (20:29 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Sun, 16 Jan 2022 07:39:36 +0000 (18:39 +1100)
commita54ba3c3d4beb902a0493db951dcae44534aebcc
treeb74b6e96f0632e538201a7474d5c10e005945c57
parentd00395852d076d69d772ae61bb2494f5ccc4d7d7
list: introduce list_is_head() helper and re-use it in list.h

Introduce list_is_head() in the similar (*) way as it's done for
list_entry_is_head().  Make use of it in the list.h.

*) it's done as inliner and not a macro to be aligned with other
   list_is_*() APIs; while at it, make all three to have the same
   style.

Link: https://lkml.kernel.org/r/20211201141824.81400-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
include/linux/list.h