Staging: lustre: Use list_{next/prev}_entry instead of list_entry
authorBhumika Goyal <bhumirks@gmail.com>
Sun, 6 Mar 2016 14:56:58 +0000 (20:26 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
commit8f5b1435a13b30c9439095abf0bb37d326515d95
tree410e778f6cbb42ec7d75ee973ae6e03b54cf1b66
parent2d513ef6c3fc9cb09225d0ff3fc7a31e76924913
Staging: lustre: Use list_{next/prev}_entry instead of list_entry

This patch replace list_entry with list_{next/prev}_entry as it makes
the code more clear to read.
Done using coccinelle:

@@
expression e1;
identifier e3;
type t;
@@
(
- list_entry(e1->e3.next,t,e3)
+ list_next_entry(e1,e3)
|
- list_entry(e1->e3.prev,t,e3)
+ list_prev_entry(e1,e3)
)

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c
drivers/staging/lustre/lustre/ldlm/ldlm_lock.c