summaryrefslogtreecommitdiff
path: root/drivers/staging/dgnc
diff options
context:
space:
mode:
authorHaneen Mohammed <hamohammed.sa@gmail.com>2017-09-16 03:41:48 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-09-18 12:45:25 +0300
commit76f6aefdba72c7e415410694282c45508b70d581 (patch)
tree804defb73a06257193ee0e87f8759a5fd2dce8f4 /drivers/staging/dgnc
parentdd7b01ad124b85620a9e1312697cb96cc5e21487 (diff)
downloadlinux-76f6aefdba72c7e415410694282c45508b70d581.tar.xz
staging: lustre: lnet: Replace list_for_each with list_for_each_entry
Replace use of the combination of list_for_each and list_entry with list_for_each_entry to simplify the code and remove variables that are used only in list_for_each. Issue found and corrected using Coccinelle script: @r@ expression head, member, e; type T1, T2, T3; iterator name list_for_each, list_for_each_entry; identifier pos, var; @@ -T1 *pos; ...when!=pos=e; -list_for_each(pos, head) +list_for_each_entry(var, head, member) { ...when!=pos=e; when!=T3 *var; -var = list_entry(pos, T2, member); ...when!=pos=e; } ...when!=pos=e; Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgnc')
0 files changed, 0 insertions, 0 deletions