Skip to contentSkip to conversation

scsi: qla2xxx: Use list_move_tail instead of list_del/list_add_tail in qla_target.c

PATCH Applied Baokun Li 3 participants 3 messages Jun 9, 2021 – Jun 16, 2021

Subsystems (3)
lore
Share & tools
lore

Baokun Li

author
#0 lore raw

PATCH v2 1/1 scsi: qla2xxx: Use list_move_tail instead of list_del/list_add_tail in qla_target.c

Using list_move_tail() instead of list_del() + list_add_tail() in qla_target.c.

---
V1->V2:
CC mailist

 drivers/scsi/qla2xxx/qla_target.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_target.c +1 -2
index 12a6848ade43..eb47140a899f 100644
@@ -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--;
Reviewed-by on v2 1/1
#1 lore raw
Quoted 17 lines · Baokun Li

Using list_move_tail() instead of list_del() + list_add_tail() in qla_target.c.

---
V1->V2:
CC mailist

  drivers/scsi/qla2xxx/qla_target.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_target.c +0 -0
index 12a6848ade43..eb47140a899f 100644

drivers/scsi/qla2xxx/qla_target.c qlt_free_qfull_cmds(struct qla_qpair *qpair) · line 5487

Quoted 9 lines
drivers/scsi/qla2xxx/qla_target.c +1 -2
@@ -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--;
Signature · 1 line
Himanshu Madhani                                Oracle Linux Engineering
#2 lore raw
In reply to Baokun Li

Baokun,

Quoted 2 lines

Using list_move_tail() instead of list_del() + list_add_tail() in qla_target.c.

Applied to 5.14/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering