Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/dca/dca-core.c: use list_move() instead of list_del()/list_add() combination

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Kirill A. Shutemov and committed by
Linus Torvalds
3bb598fb f99a9933

+2 -4
+2 -4
drivers/dca/dca-core.c
··· 111 111 /* at this point only one domain in the list is expected */ 112 112 domain = list_first_entry(&dca_domains, struct dca_domain, node); 113 113 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); 118 116 119 117 dca_free_domain(domain); 120 118