From: Baokun Li Date: Wed, 9 Jun 2021 07:23:21 +0000 (+0800) Subject: scsi: qla2xxx: Use list_move_tail() instead of list_del()/list_add_tail() X-Git-Tag: v5.15~733^2~79 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b6e7fba0c9ccba96198762b1b51559543466de03;p=platform%2Fkernel%2Flinux-starfive.git scsi: qla2xxx: 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/20210609072321.1356896-1-libaokun1@huawei.com Reported-by: Hulk Robot Reviewed-by: Himanshu Madhani Signed-off-by: Baokun Li Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index b2008fb..41c11f2 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -5479,8 +5479,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--;