Skip to content

Commit 3bb598f

Browse files
kiryltorvalds
authored andcommitted
drivers/dca/dca-core.c: use list_move() instead of list_del()/list_add() combination
Signed-off-by: Kirill A. Shutemov <[email protected]> Cc: Maciej Sosnowski <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent f99a993 commit 3bb598f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/dca/dca-core.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,8 @@ static void unregister_dca_providers(void)
111111
/* at this point only one domain in the list is expected */
112112
domain = list_first_entry(&dca_domains, struct dca_domain, node);
113113

114-
list_for_each_entry_safe(dca, _dca, &domain->dca_providers, node) {
115-
list_del(&dca->node);
116-
list_add(&dca->node, &unregistered_providers);
117-
}
114+
list_for_each_entry_safe(dca, _dca, &domain->dca_providers, node)
115+
list_move(&dca->node, &unregistered_providers);
118116

119117
dca_free_domain(domain);
120118

0 commit comments

Comments
 (0)