Staging: lustre: lnet: Use list_first_entry_or_null
commit2d513ef6c3fc9cb09225d0ff3fc7a31e76924913
authorBhumika Goyal <bhumirks@gmail.com>
Sun, 6 Mar 2016 14:38:44 +0000 (6 20:08 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (11 22:09 -0800)
treedd99a5ebcc7fa6005a3508a299de5dcc71bdca22
parent19cc827b6c7baa01e9f5f2b792e5b6b9550749d2
Staging: lustre: lnet: Use list_first_entry_or_null

This patch replaces list_empty and list_entry with
list_first_entry_or_null.
Done using coccinelle:

@@
expression e1,e2;
statement S;
@@
- if(!list_empty(...)){
  e2=
- list_entry(e1.next,
+ list_first_entry_or_null(&e1,
  ...);
+ if(e2){
...
}

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/selftest/conrpc.c
drivers/staging/lustre/lnet/selftest/framework.c