From patchwork Wed Jun 9 07:23:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "libaokun \(A\)" X-Patchwork-Id: 457251 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ECA35C47095 for ; Wed, 9 Jun 2021 07:14:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C26BD61352 for ; Wed, 9 Jun 2021 07:14:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235492AbhFIHQJ (ORCPT ); Wed, 9 Jun 2021 03:16:09 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:5464 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232746AbhFIHQJ (ORCPT ); Wed, 9 Jun 2021 03:16:09 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4G0JDq3mfvzZfWx; Wed, 9 Jun 2021 15:11:23 +0800 (CST) Received: from dggpeml500020.china.huawei.com (7.185.36.88) by dggemv703-chm.china.huawei.com (10.3.19.46) 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:14:13 +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:14:12 +0800 From: Baokun Li To: , Nilesh Javali , , "James E.J. Bottomley" , "Martin K. Petersen" CC: , , , , , , , Hulk Robot Subject: [PATCH -next v2] scsi: qla2xxx: Use list_move_tail instead of list_del/list_add_tail in qla_target.c Date: Wed, 9 Jun 2021 15:23:21 +0800 Message-ID: <20210609072321.1356896-1-libaokun1@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 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-scsi@vger.kernel.org Using list_move_tail() instead of list_del() + list_add_tail() in qla_target.c. Reported-by: Hulk Robot Signed-off-by: Baokun Li Reviewed-by: Himanshu Madhani --- V1->V2: CC mailist drivers/scsi/qla2xxx/qla_target.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 12a6848ade43..eb47140a899f 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -5481,8 +5481,7 @@ qlt_free_qfull_cmds(struct qla_qpair *qpair) "%s: Unexpected cmd in QFull list %p\n", __func__, cmd); - list_del(&cmd->cmd_list); - list_add_tail(&cmd->cmd_list, &free_list); + list_move_tail(&cmd->cmd_list, &free_list); /* piggy back on hardware_lock for protection */ vha->hw->tgt.num_qfull_cmds_alloc--;