Skip to contentSkip to conversation

scsi: bnx2fc: Remove a duplicate assignment in two functions

PATCH In review Minjie Du 3 participants 3 messages Jul 5, 2023 – Jul 6, 2023

Subsystems (2)
lore
Share & tools
lore

Minjie Du

author
#0 lore raw

PATCH v2 1/1 scsi: bnx2fc: Remove a duplicate assignment in two functions

Delete a duplicate statement from these function implementations.

---
 drivers/scsi/bnx2fc/bnx2fc_hwi.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/scsi/bnx2fc/bnx2fc_hwi.c +0 -3
index 776544385..0474fe88a 100644
@@ -1521,8 +1521,6 @@ void bnx2fc_init_seq_cleanup_task(struct bnx2fc_cmd *seq_clnp_req,
 				FCOE_TCE_TX_WR_RX_RD_CONST_CLASS_TYPE_SHIFT;
 	task->rxwr_txrd.const_ctx.init_flags = context_id <<
 				FCOE_TCE_RX_WR_TX_RD_CONST_CID_SHIFT;
-	task->rxwr_txrd.const_ctx.init_flags = context_id <<
-				FCOE_TCE_RX_WR_TX_RD_CONST_CID_SHIFT;
 
 	task->txwr_rxrd.union_ctx.cleanup.ctx.cleaned_task_id = orig_xid;
 
@@ -1763,7 +1761,6 @@ void bnx2fc_init_task(struct bnx2fc_cmd *io_req,
 				FCOE_TASK_DEV_TYPE_TAPE <<
 				FCOE_TCE_TX_WR_RX_RD_CONST_DEV_TYPE_SHIFT;
 		io_req->rec_retry = 0;
-		io_req->rec_retry = 0;
 	} else
 		task->txwr_rxrd.const_ctx.init_flags |=
 				FCOE_TASK_DEV_TYPE_DISK <<
Signature · 1 line
2.39.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 26 lines · Minjie Du

Delete a duplicate statement from these function implementations.

---
 drivers/scsi/bnx2fc/bnx2fc_hwi.c | 3 ---

 1 file changed, 3 deletions(-)
drivers/scsi/bnx2fc/bnx2fc_hwi.c +0 -0
index 776544385..0474fe88a 100644
@@ -1521,8 +1521,6 @@ void bnx2fc_init_seq_cleanup_task(struct
 bnx2fc_cmd *seq_clnp_req,

                                FCOE_TCE_TX_WR_RX_RD_CONST_CLASS_TYPE _SHIFT;
        task->rxwr_txrd.const_ctx.init_flags = context_id << FCOE_TCE_RX_WR_TX_RD_CONST_CID_SHIFT; -       task->rxwr_txrd.const_ctx.init_flags = context_id << -                               FCOE_TCE_RX_WR_TX_RD_CONST_CID_SHIFT;
        task->txwr_rxrd.union_ctx.cleanup.ctx.cleaned_task_id = orig_xid;

drivers/scsi/bnx2fc/bnx2fc_hwi.c +0 -0
@@ -1763,7 +1761,6 @@ void bnx2fc_init_task(struct bnx2fc_cmd
 *io_req,
Quoted 8 lines

                                FCOE_TASK_DEV_TYPE_TAPE << FCOE_TCE_TX_WR_RX_RD_CONST_DEV_TYPE_S HIFT;
                io_req->rec_retry = 0;
-               io_req->rec_retry = 0;
        } else
                task->txwr_rxrd.const_ctx.init_flags |= FCOE_TASK_DEV_TYPE_DISK <<

Looks good to me:

#2 lore raw
In reply to Minjie Du

Le 05/07/2023 à 13:52, Minjie Du a écrit :

Quoted 21 lines

Delete a duplicate statement from these function implementations.

---
  drivers/scsi/bnx2fc/bnx2fc_hwi.c | 3 ---
  1 file changed, 3 deletions(-)
drivers/scsi/bnx2fc/bnx2fc_hwi.c +0 -2
index 776544385..0474fe88a 100644
@@ -1521,8 +1521,6 @@ void bnx2fc_init_seq_cleanup_task(struct bnx2fc_cmd *seq_clnp_req,
  				FCOE_TCE_TX_WR_RX_RD_CONST_CLASS_TYPE_SHIFT;
  	task->rxwr_txrd.const_ctx.init_flags = context_id <<
  				FCOE_TCE_RX_WR_TX_RD_CONST_CID_SHIFT;
-	task->rxwr_txrd.const_ctx.init_flags = context_id <<
-				FCOE_TCE_RX_WR_TX_RD_CONST_CID_SHIFT;
 
  	task->txwr_rxrd.union_ctx.cleanup.ctx.cleaned_task_id = orig_xid;
 

drivers/scsi/bnx2fc/bnx2fc_hwi.c void bnx2fc_init_task(struct bnx2fc_cmd *io_req, · line 1766

Quoted 4 lines
drivers/scsi/bnx2fc/bnx2fc_hwi.c +0 -1
@@ -1763,7 +1761,6 @@ void bnx2fc_init_task(struct bnx2fc_cmd *io_req,
  				FCOE_TASK_DEV_TYPE_TAPE <<
  				FCOE_TCE_TX_WR_RX_RD_CONST_DEV_TYPE_SHIFT;
  		io_req->rec_retry = 0;
-		io_req->rec_retry = 0;

Hi,

just a blind guess:

   io_req->srr_retry = 0;
           ~~~

?

Quoted 3 lines
drivers/scsi/bnx2fc/bnx2fc_hwi.c +0 -0
  	} else
  		task->txwr_rxrd.const_ctx.init_flags |=
  				FCOE_TASK_DEV_TYPE_DISK <<