Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4971343pxj; Wed, 9 Jun 2021 06:27:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZbMXEBpO0coYvcSznHa9HprLYNv9f3jXeZsl9IbG6l+JPqvM6PkdOGFRPRgliAm9GSPNg X-Received: by 2002:a05:6402:885:: with SMTP id e5mr31153712edy.248.1623245240386; Wed, 09 Jun 2021 06:27:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623245240; cv=none; d=google.com; s=arc-20160816; b=sbIto9p1QL62QBhUfhz2G5Ut7dky8bR/tYQB5pwlvq5/aEFWf8Ne3YNJnlRLUahh4B NrEw6wpLTaweywZ0JPmifp+SMtwnLobkEK8pdZu8xAOm6YQ1pBe7AxWZ9vK3MssuGxW6 VWmjWwPT/JE48QAbCnuQWwbWd99CtbZMtlJAzX7qHyF9JE2P8JTIitHW+p42nP4JgY3V vqRUeyR6YzeoAPeKYGaEHAS8NZcH+0cRzoCOBkk3+ycURAJBDtqLBv1zUpSw24LeOpgo 4DFgBXcAAziZifNE3cl4S2jpev4FeJOZySL+CAY4B7XIR5HqY9OibR5TjlDbe+pnlasg IGsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=o0EHBdoiZxs/8t8p0PIF1DNAca8neNbV3SKHrqfK39s=; b=NQS6oRwCUzhHD+dQT+8pI2QUa4BOc8dRTW9i0OkiTRPDPJtT5jHzZ/P9cNmXHtmXqo SbafYuKKQDEZC1j3K89mD1wuoE7blJ1cPDoHfDa7ebGbSfDeivT7fQJxtprOgwA45WtZ XbREX8gEtZ49RuYWJJ2NAwvW/rM3SHEgAPyNZoabHRWgu0jxcT+VKi14XLsI9JI8PO9o d63oooV1XjCVvAQxoQHpC0H3b0bsdQk2rzoLK07HcVsJR2vePME3w6Y6kQ7nwJCeAt2B /h/LtWSBFiUyH7mQxQrdmji8RTOKm4I+hFQ25JwRsI9Ht16FasDVa5JRhOwkjiaxbFD8 8FcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ck12si2261534edb.107.2021.06.09.06.26.55; Wed, 09 Jun 2021 06:27:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234996AbhFIHHb (ORCPT + 99 others); Wed, 9 Jun 2021 03:07:31 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:8109 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234657AbhFIHH2 (ORCPT ); Wed, 9 Jun 2021 03:07:28 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4G0J2l6xSjzYsXQ; Wed, 9 Jun 2021 15:02:39 +0800 (CST) Received: from dggpeml500020.china.huawei.com (7.185.36.88) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 9 Jun 2021 15:05:21 +0800 Received: from huawei.com (10.175.127.227) by dggpeml500020.china.huawei.com (7.185.36.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 9 Jun 2021 15:05:20 +0800 From: Baokun Li To: , Scott Branden , Arnd Bergmann , "Greg Kroah-Hartman" CC: , , , , , , , Hulk Robot Subject: [PATCH -next v2] misc: bcm-vk: use list_move_tail instead of list_del/list_add_tail in bcm_vk_msg.c Date: Wed, 9 Jun 2021 15:14:30 +0800 Message-ID: <20210609071430.1337400-1-libaokun1@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500020.china.huawei.com (7.185.36.88) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using list_move_tail() instead of list_del() + list_add_tail() in bcm_vk_msg.c. Reported-by: Hulk Robot Signed-off-by: Baokun Li --- 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); } } }