misc: bcm-vk: use list_move_tail instead of list_del/list_add_tail in bcm_vk_msg.c
Subsystems (3)
PATCH v2 1/1 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 <[email protected]>
Signed-off-by Baokun Li <[email protected]>
---V1->V2:
CC mailist
drivers/misc/bcm-vk/bcm_vk_msg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/misc/bcm-vk/bcm_vk_msg.c +1 -2
@@ -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); } } }
Quoted 4 lines · Baokun Li
Using
list_move_tail()instead oflist_del()+list_add_tail()inbcm_vk_msg.c.Reported-by Hulk Robot <[email protected]>Signed-off-by Baokun Li <[email protected]>
Acked-by Scott Branden <[email protected]>
Quoted 22 lines
---
V1->V2:
CC mailistdrivers/misc/bcm-vk/bcm_vk_msg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/misc/bcm-vk/bcm_vk_msg.c +1
-2@@ -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); } } }