lkml.org 
[lkml]   [2021]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH -next v2] misc: bcm-vk: use list_move_tail instead of list_del/list_add_tail in bcm_vk_msg.c
From
Date
On 2021-06-09 12:14 a.m., Baokun Li wrote:
> 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>
Acked-by: Scott Branden <scott.branden@broadcom.com>
> ---
> V1->V2:
> CC mailist
>
> drivers/misc/bcm-vk/bcm_vk_msg.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/misc/bcm-vk/bcm_vk_msg.c b/drivers/misc/bcm-vk/bcm_vk_msg.c
> index 6efc52b49af6..066b9ef7fcd7 100644
> --- a/drivers/misc/bcm-vk/bcm_vk_msg.c
> +++ b/drivers/misc/bcm-vk/bcm_vk_msg.c
> @@ -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);
> }
> }
> }
>

[unhandled content-type:application/pkcs7-signature]
\
 
 \ /
  Last update: 2021-06-09 17:59    [W:0.027 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site