diff options
author | Zou Wei <zou_wei@huawei.com> | 2021-06-08 08:51:33 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-06-15 22:25:56 -0400 |
commit | 47018083602326462f2a254d1935a8fd3b758c6b (patch) | |
tree | ac3edc8902cc1fdc615f7107bf7f5168249d394c /drivers/scsi/lpfc | |
parent | 52e1b3b3daa9d53f0204bf474ee1d4b1beb38234 (diff) | |
download | linux-47018083602326462f2a254d1935a8fd3b758c6b.tar.gz linux-47018083602326462f2a254d1935a8fd3b758c6b.tar.bz2 linux-47018083602326462f2a254d1935a8fd3b758c6b.zip |
scsi: lpfc: Use list_move_tail() instead of list_del()/list_add_tail()
Using list_move_tail() instead of list_del() + list_add_tail().
Link: https://lore.kernel.org/r/1623113493-49384-1-git-send-email-zou_wei@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Reviewed-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index a2ef3a6a4544..993f9c0dd006 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -20185,8 +20185,7 @@ lpfc_cleanup_pending_mbox(struct lpfc_vport *vport) (mb->u.mb.mbxCommand != MBX_REG_VPI)) continue; - list_del(&mb->list); - list_add_tail(&mb->list, &mbox_cmd_list); + list_move_tail(&mb->list, &mbox_cmd_list); } /* Clean up active mailbox command with the vport */ mb = phba->sli.mbox_active; |