list: introduce list_is_head() helper and re-use it in list.h
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 20 Jan 2022 02:08:56 +0000 (18:08 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:23:09 +0000 (10:23 +0200)
commit8be32624f4572c017e4514d680213f5d0b276bd5
treef22356f583b87d290128b117e0f0d2176784f0dc
parentb53f6ba21b9446779e1acbe62ffff1b04f860e74
list: introduce list_is_head() helper and re-use it in list.h

[ Upstream commit 0425473037db40d9e322631f2d4dc6ef51f97e88 ]

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: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/list.h