linux/include
Andy Shevchenko e130816164 include/linux/list.h: add a macro to test if entry is pointing to the head
Add a macro to test if entry is pointing to the head of the list which is
useful in cases like:

  list_for_each_entry(pos, &head, member) {
    if (cond)
      break;
  }
  if (list_entry_is_head(pos, &head, member))
    return -ERRNO;

that allows to avoid additional variable to be added to track if loop has
not been stopped in the middle.

While here, convert list_for_each_entry*() family of macros to use a new one.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lkml.kernel.org/r/20200929134342.51489-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-10-16 11:11:20 -07:00
..
acpi ACPI updates for 5.10-rc1 2020-10-14 11:42:04 -07:00
asm-generic dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
clocksource clocksource/drivers/sp804: Remove unused sp804_timer_disable() and timer-sp804.h 2020-09-24 10:51:04 +02:00
crypto X.509: Fix modular build of public_key_sm2 2020-10-08 16:39:14 +11:00
drm sound updates for 5.10 2020-10-15 11:07:44 -07:00
dt-bindings sound updates for 5.10 2020-10-15 11:07:44 -07:00
keys
kunit KUnit: KASAN Integration 2020-10-13 18:38:32 -07:00
kvm KVM: arm64: pmu: Make overflow handler NMI safe 2020-09-28 19:00:17 +01:00
linux include/linux/list.h: add a macro to test if entry is pointing to the head 2020-10-16 11:11:20 -07:00
math-emu
media Linux 5.9-rc7 2020-10-04 12:19:12 +02:00
memory
misc
net Merge branch 'work.csum_and_copy' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-10-12 16:24:13 -07:00
pcmcia
ras mm,hwpoison: introduce MF_MSG_UNSPLIT_THP 2020-10-16 11:11:17 -07:00
rdma
scsi SCSI misc on 20201013 2020-10-14 15:15:35 -07:00
soc USB/PHY/Thunderbolt driver patches for 5.10-rc1 2020-10-15 09:51:18 -07:00
sound ASoC: Updates for v5.10 2020-10-12 16:08:57 +02:00
target
trace sound updates for 5.10 2020-10-15 11:07:44 -07:00
uapi \n 2020-10-15 14:56:15 -07:00
vdso
video
xen arm/arm64: xen: Fix to convert percpu address to gfn correctly 2020-10-07 07:08:43 +02:00