Commit 20827ddd authored by Baokun Li's avatar Baokun Li Committed by Greg Kroah-Hartman

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: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarBaokun Li <libaokun1@huawei.com>
Link: https://lore.kernel.org/r/20210609071430.1337400-1-libaokun1@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 432b6c56
......@@ -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);
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment