Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5147380pxj; Wed, 9 Jun 2021 10:11:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeD1duLIMksCnWC/k9RA5x1rNOVOcTxpZX0AcCuAl9/7A/ZXSWuLIrdyIOJ8AwzdT4h/86 X-Received: by 2002:a17:906:724b:: with SMTP id n11mr878803ejk.338.1623258662503; Wed, 09 Jun 2021 10:11:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623258662; cv=none; d=google.com; s=arc-20160816; b=tCsVv1id+xkXAaZi71XndjWf/gvjRAsVxkp66MNILo92aCKqBNFh12BPOketi9DNIL qn14cO04vqoaYwBJlc6GzICuKkZHS0Flr0FGDWosQ0DrZbhkEaVexf0CuevWcO+j5EC/ KxytbQ1neoEf0sEBm3uVMRujQWVRp1rGK1GpteWRnLLkVfaz/+4127oCaHGrQQ0GRYKs tZ5JDgbOEYPqhrTUlgZQmB35YBL6KET4IPMNiLg5FNnAR1aEMak8MtbxIAnhnfmwtRcJ EzsbTrmE1wp08h9S13DrEhMDJ3wUVCKeQR5CAgX+IEplJi0MsXWFTNU5fD/hOzjUpD2o KQcw== 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=wcFDy2BNsCrRTTke+4RiudMPPL3NBytzmNeSotcgTy8=; b=hvpYfKefcCCZbk1+b2l1K2WZx9MKE9E0FrGRGWa5+d6KDaG1zk8j+0rE/2gL/5p+rG K7qAFSBQ2VJAR8IO0tRZXiDZj1tspJPUJDv+vKjf8l6rloR6sVnvdbBUAQyhQ3UiU1A1 2QB4fsSgjshHU05IvPn/aKR0fPeh98SD3cyelyBavsjNJv6sAlTPdPN8MmUdgN8lrI6O dYkYFe2+keNoOlrkeUDx4qIC7SqtvcR+OgNGMGQNh6rD2WimNoFTSTK6iaGhZS0m49Eh 2d6NEyDhDcSwywh/4g7D/Dt2nzZ9dIsTh/9HXQsLvDJv8fI09u45fzU+WXoUt0NhJMye IW5A== 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 j23si298177eje.719.2021.06.09.10.10.38; Wed, 09 Jun 2021 10:11:02 -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 S236915AbhFIHSg (ORCPT + 99 others); Wed, 9 Jun 2021 03:18:36 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:3916 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232746AbhFIHSf (ORCPT ); Wed, 9 Jun 2021 03:18:35 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4G0JHN0mXlz6tqB; Wed, 9 Jun 2021 15:13:36 +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:16:39 +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:16:39 +0800 From: Baokun Li To: , Anil Gurumurthy , Sudarsana Kalluru , "James E.J. Bottomley" , "Martin K. Petersen" CC: , , , , , , , Hulk Robot Subject: [PATCH -next v2] scsi: bfa: Use list_move_tail instead of list_del/list_add_tail in bfa_svc.c Date: Wed, 9 Jun 2021 15:25:48 +0800 Message-ID: <20210609072548.1357835-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 bfa_svc.c. Reported-by: Hulk Robot Signed-off-by: Baokun Li --- V1->V2: CC mailist drivers/scsi/bfa/bfa_svc.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/bfa/bfa_svc.c b/drivers/scsi/bfa/bfa_svc.c index 4e3cef02f10f..ae31a0605efe 100644 --- a/drivers/scsi/bfa/bfa_svc.c +++ b/drivers/scsi/bfa/bfa_svc.c @@ -1572,8 +1572,7 @@ bfa_lps_login_rsp(struct bfa_s *bfa, struct bfi_lps_login_rsp_s *rsp) break; } - list_del(&lps->qe); - list_add_tail(&lps->qe, &mod->lps_active_q); + list_move_tail(&lps->qe, &mod->lps_active_q); bfa_sm_send_event(lps, BFA_LPS_SM_FWRSP); } @@ -1594,8 +1593,7 @@ bfa_lps_no_res(struct bfa_lps_s *first_lps, u8 count) lps = (struct bfa_lps_s *)qe; bfa_trc(bfa, lps->bfa_tag); lps->status = first_lps->status; - list_del(&lps->qe); - list_add_tail(&lps->qe, &mod->lps_active_q); + list_move_tail(&lps->qe, &mod->lps_active_q); bfa_sm_send_event(lps, BFA_LPS_SM_FWRSP); qe = qe_next; count--; @@ -1651,8 +1649,7 @@ bfa_lps_free(struct bfa_lps_s *lps) struct bfa_lps_mod_s *mod = BFA_LPS_MOD(lps->bfa); lps->lp_pid = 0; - list_del(&lps->qe); - list_add_tail(&lps->qe, &mod->lps_free_q); + list_move_tail(&lps->qe, &mod->lps_free_q); } /* @@ -1679,8 +1676,7 @@ bfa_lps_send_login(struct bfa_lps_s *lps) m->auth_en = lps->auth_en; bfa_reqq_produce(lps->bfa, lps->reqq, m->mh); - list_del(&lps->qe); - list_add_tail(&lps->qe, &mod->lps_login_q); + list_move_tail(&lps->qe, &mod->lps_login_q); } /* @@ -4877,8 +4873,7 @@ bfa_rport_free(struct bfa_rport_s *rport) struct bfa_rport_mod_s *mod = BFA_RPORT_MOD(rport->bfa); WARN_ON(!bfa_q_is_on_q(&mod->rp_active_q, rport)); - list_del(&rport->qe); - list_add_tail(&rport->qe, &mod->rp_free_q); + list_move_tail(&rport->qe, &mod->rp_free_q); } static bfa_boolean_t