]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[SCSI] bnx2fc: remove useless calls to memset().
authorCyril Roelandt <tipecaml@gmail.com>
Sat, 22 Dec 2012 03:40:27 +0000 (19:40 -0800)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 29 Jan 2013 04:02:22 +0000 (15:02 +1100)
These calls are followed by calls to memcpy() on the same memory area, so they
can be safely removed.

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/bnx2fc/bnx2fc_hwi.c

index ef60afa94d0e75c265a5010be1dc72c62b82166b..9be42b84a1a8298f5f9293496a815b4ef6d684f7 100644 (file)
@@ -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));