Thread (11 messages) 11 messages, 5 authors, 2012-12-03

Re: [PATCH 3/6] scsi: bnx2fc: remove useless calls to memset().

From: Bhanu Prakash Gollapudi <hidden>
Date: 2012-12-03 22:19:16
Also in: linux-scsi, lkml

On 12/01/2012 06:40 PM, Cyril Roelandt wrote:
quoted hunk ↗ jump to hunk
These calls are followed by calls to memcpy() on the same memory area, so they
can be safely removed.

Signed-off-by: Cyril Roelandt <redacted>
---
  drivers/scsi/bnx2fc/bnx2fc_hwi.c |    4 ----
  1 file changed, 4 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
index ef60afa..9be42b8 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_hwi.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
@@ -759,8 +759,6 @@ static void bnx2fc_process_unsol_compl(struct bnx2fc_rport *tgt, u16 wqe)
  		case FCOE_ERROR_CODE_DATA_SOFN_SEQ_ACTIVE_RESET:
  			BNX2FC_TGT_DBG(tgt, "REC TOV popped for xid - 0x%x\n",
  				   xid);
-			memset(&io_req->err_entry, 0,
-			       sizeof(struct fcoe_err_report_entry));
  			memcpy(&io_req->err_entry, err_entry,
  			       sizeof(struct fcoe_err_report_entry));
  			if (!test_bit(BNX2FC_FLAG_SRR_SENT,
@@ -847,8 +845,6 @@ ret_err_rqe:
  			goto ret_warn_rqe;
  		}
  
-		memset(&io_req->err_entry, 0,
-		       sizeof(struct fcoe_err_report_entry));
  		memcpy(&io_req->err_entry, err_entry,
  		       sizeof(struct fcoe_err_report_entry));
  
Acked-by: Bhanu Prakash Gollapudi <redacted>

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help