misc: bcm-vk: use list_move_tail instead of list_del/list_add_tail in bcm_vk_msg.c

Using list_move_tail() instead of list_del() + list_add_tail() in bcm_vk_msg.c.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Link: https://lore.kernel.org/r/20210609071430.1337400-1-libaokun1@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Baokun Li 2021-06-09 15:14:30 +08:00 committed by Greg Kroah-Hartman
parent 432b6c5607
commit 20827dddf2
1 changed files with 1 additions and 2 deletions

View File

@ -354,8 +354,7 @@ static void bcm_vk_drain_all_pend(struct device *dev,
for (num = 0; num < chan->q_nr; num++) {
list_for_each_entry_safe(entry, tmp, &chan->pendq[num], node) {
if ((!ctx) || (entry->ctx->idx == ctx->idx)) {
list_del(&entry->node);
list_add_tail(&entry->node, &del_q);
list_move_tail(&entry->node, &del_q);
}
}
}