*** BLURB HERE ***
Li Heng (3):
scsi: Remove superfluous memset()
scsi: Remove superfluous memset()
scsi: Remove superfluous memset()
drivers/scsi/mpt3sas/mpt3sas_base.c | 1 -
drivers/scsi/pmcraid.c | 1 -
drivers/scsi/qla2xxx/qla_mbx.c | 2 --
3 files changed, 4 deletions(-)
--
2.7.4
Fixes coccicheck warning:
./drivers/scsi/pmcraid.c:4709:3-21: WARNING: dma_alloc_coherent use in pinstance -> hrrq_start [ i ] already zeroes out memory, so memset is not needed
dma_alloc_coherent use in status already zeroes out memory, so memset is not needed
Signed-off-by: Li Heng <[email protected]>
---
drivers/scsi/pmcraid.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index aa9ae2a..d99568f 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -4716,7 +4716,6 @@ static int pmcraid_allocate_host_rrqs(struct pmcraid_instance *pinstance)
return -ENOMEM;
}
- memset(pinstance->hrrq_start[i], 0, buffer_size);
pinstance->hrrq_curr[i] = pinstance->hrrq_start[i];
pinstance->hrrq_end[i] =
pinstance->hrrq_start[i] + PMCRAID_MAX_CMD - 1;
--
2.7.4
Fixes coccicheck warning:
./drivers/scsi/mpt3sas/mpt3sas_base.c:5247:16-34: WARNING: dma_alloc_coherent use in ioc -> request already zeroes out memory, so memset is not needed
dma_alloc_coherent use in status already zeroes out memory, so memset is not needed
Signed-off-by: Li Heng <[email protected]>
---
drivers/scsi/mpt3sas/mpt3sas_base.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 1d64524..61219ad 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -5257,7 +5257,6 @@ _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc)
_base_release_memory_pools(ioc);
goto retry_allocation;
}
- memset(ioc->request, 0, sz);
if (retry_sz)
ioc_err(ioc, "request pool: dma_alloc_coherent succeed: hba_depth(%d), chains_per_io(%d), frame_sz(%d), total(%d kb)\n",
--
2.7.4
Fixes coccicheck warning:
./drivers/scsi/qla2xxx/qla_mbx.c:4928:15-33: WARNING: dma_alloc_coherent use in els_cmd_map already zeroes out memory, so memset is not needed
dma_alloc_coherent use in status already zeroes out memory, so memset is not needed
Signed-off-by: Li Heng <[email protected]>
---
drivers/scsi/qla2xxx/qla_mbx.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 7388343..14656da 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -4933,8 +4933,6 @@ qla25xx_set_els_cmds_supported(scsi_qla_host_t *vha)
return QLA_MEMORY_ALLOC_FAILED;
}
- memset(els_cmd_map, 0, ELS_CMD_MAP_SIZE);
-
/* List of Purex ELS */
cmd_opcode[0] = ELS_FPIN;
cmd_opcode[1] = ELS_RDP;
--
2.7.4
On Thu, 30 Jul 2020 11:31:55 +0800, Li Heng wrote:
> *** BLURB HERE ***
>
> Li Heng (3):
> scsi: Remove superfluous memset()
> scsi: Remove superfluous memset()
> scsi: Remove superfluous memset()
>
> [...]
Applied to 5.10/scsi-queue, thanks!
[1/3] scsi: pmcraid: Remove superfluous memset()
https://git.kernel.org/mkp/scsi/c/7b1d88629807
[2/3] scsi: qla2xxx: Remove superfluous memset()
https://git.kernel.org/mkp/scsi/c/bef93fbfcf4a
[3/3] scsi: mpt3sas: Remove superfluous memset()
https://git.kernel.org/mkp/scsi/c/4a636e9c7a21
--
Martin K. Petersen Oracle Linux Engineering