@@ -2763,7 +2763,6 @@ bfa_ioc_get_type(struct bfa_ioc_s *ioc)
void
bfa_ioc_get_adapter_serial_num(struct bfa_ioc_s *ioc, char *serial_num)
{
- memset((void *)serial_num, 0, BFA_ADAPTER_SERIAL_NUM_LEN);
memcpy((void *)serial_num,
(void *)ioc->attr->brcd_serialnum,
BFA_ADAPTER_SERIAL_NUM_LEN);
@@ -1505,8 +1505,6 @@ map_cmd_status(struct fusion_context *fusion,
scmd->result = (DID_OK << 16) | ext_status;
if (ext_status == SAM_STAT_CHECK_CONDITION) {
- memset(scmd->sense_buffer, 0,
- SCSI_SENSE_BUFFERSIZE);
memcpy(scmd->sense_buffer, sense,
SCSI_SENSE_BUFFERSIZE);
scmd->result |= DRIVER_SENSE << 24;
@@ -619,7 +619,6 @@ static void qla4xxx_create_chap_list(struct scsi_qla_host *ha)
goto exit_chap_list;
}
- memset(ha->chap_list, 0, chap_size);
memcpy(ha->chap_list, chap_flash_data, chap_size);
exit_chap_list:
calling memcpy immediately after memset with the same region of memory makes memset redundant. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> --- drivers/scsi/bfa/bfa_ioc.c | 1 - drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 -- drivers/scsi/qla4xxx/ql4_os.c | 1 - 3 files changed, 4 deletions(-)