Skip to contentSkip to conversation

Use list_for_each_entry_safe

PATCH New Bhaktipriya Shridhar 1 participant 1 message Mar 11, 2016

lore
Share & tools
lore
#0 lore raw

v3 cover Use list_for_each_entry_safe

This patch-set replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe.

Doubly linked lists which are iterated using list_empty and list_entry macros have been replaced with list_for_each_entry_safe macro.

This makes the iteration simpler and more readable.

Bhaktipriya Shridhar (13):
staging: lustre: obdclass: Use list_for_each_entry_safe
staging: lustre: lnet: lib-move: Use list_for_each_entry_safe
staging: lustre: lnet: conrpc: Use list_for_each_entry_safe
staging: lustre: lnet: router: Use list_for_each_entry_safe
staging: lustre: lnet: config: Use list_for_each_entry_safe
staging: lustre: lnet: peer: Use list_for_each_entry_safe
staging: lustre: lnet: api-ni: Use list_for_each_entry_safe
staging: lustre: osc: Use list_for_each_entry_safe
staging: lustre: osc_cache: Use list_for_each_entry_safe
staging: lustre: libcfs: Use list_for_each_entry_safe
staging: lustre: lnet: socklnd_proto: Use list_for_each_entry_safe
staging: lustre: lnet: socklnd: Use list_for_each_entry_safe
staging: lustre: lnet: o2iblnd: Use list_for_each_entry_safe

 drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c    |  4 ++--
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c       |  9 ++++-----
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c |  4 ++--
 drivers/staging/lustre/lnet/libcfs/workitem.c             |  5 ++---
 drivers/staging/lustre/lnet/lnet/api-ni.c                 | 10 ++++------
 drivers/staging/lustre/lnet/lnet/config.c                 |  5 ++---
 drivers/staging/lustre/lnet/lnet/lib-move.c               |  9 ++++-----
 drivers/staging/lustre/lnet/lnet/peer.c                   |  4 ++--
 drivers/staging/lustre/lnet/lnet/router.c                 |  4 ++--
 drivers/staging/lustre/lnet/selftest/conrpc.c             |  5 ++---
 drivers/staging/lustre/lustre/obdclass/lustre_peer.c      |  5 ++---
 drivers/staging/lustre/lustre/osc/osc_cache.c             |  9 ++++-----
 drivers/staging/lustre/lustre/osc/osc_page.c              |  5 ++---
 13 files changed, 34 insertions(+), 44 deletions(-)

--
2.1.4