Commit 1fbc9f46a024535d95c3d5f136901decd86b109e

Authored by Eric Sesterhenn
Committed by Martin Schwidefsky
1 parent ab640db010

[S390] list usage cleanup in s390

Trivial cleanup, list_del(); list_add{,_tail}() is equivalent
to list_move{,_tail}(). Semantic patch for coccinelle can be
found at www.cccmz.de/~snakebyte/list_move_tail.spatch

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

Showing 1 changed file with 2 additions and 4 deletions Side-by-side Diff

drivers/s390/crypto/zcrypt_api.c
... ... @@ -128,8 +128,7 @@
128 128 if (l == zdev->list.prev)
129 129 return;
130 130 /* Move zdev behind l */
131   - list_del(&zdev->list);
132   - list_add(&zdev->list, l);
  131 + list_move(&zdev->list, l);
133 132 }
134 133  
135 134 /**
... ... @@ -157,8 +156,7 @@
157 156 if (l == zdev->list.next)
158 157 return;
159 158 /* Move zdev before l */
160   - list_del(&zdev->list);
161   - list_add_tail(&zdev->list, l);
  159 + list_move_tail(&zdev->list, l);
162 160 }
163 161  
164 162 static void zcrypt_device_release(struct kref *kref)