linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next 0/3] scsi: Remove superfluous memset()
@ 2020-07-30  3:31 Li Heng
  2020-07-30  3:31 ` [PATCH -next 1/3] " Li Heng
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Li Heng @ 2020-07-30  3:31 UTC (permalink / raw)
  To: martin.petersen, jejb; +Cc: MPT-FusionLinux.pdl, linux-scsi, linux-kernel

*** 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH -next 1/3] scsi: Remove superfluous memset()
  2020-07-30  3:31 [PATCH -next 0/3] scsi: Remove superfluous memset() Li Heng
@ 2020-07-30  3:31 ` Li Heng
  2020-07-30  3:31 ` [PATCH -next 2/3] " Li Heng
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Li Heng @ 2020-07-30  3:31 UTC (permalink / raw)
  To: martin.petersen, jejb; +Cc: MPT-FusionLinux.pdl, linux-scsi, linux-kernel

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 <liheng40@huawei.com>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH -next 2/3] scsi: Remove superfluous memset()
  2020-07-30  3:31 [PATCH -next 0/3] scsi: Remove superfluous memset() Li Heng
  2020-07-30  3:31 ` [PATCH -next 1/3] " Li Heng
@ 2020-07-30  3:31 ` Li Heng
  2020-07-30  3:31 ` [PATCH -next 3/3] " Li Heng
  2020-09-09  2:17 ` [PATCH -next 0/3] " Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Li Heng @ 2020-07-30  3:31 UTC (permalink / raw)
  To: martin.petersen, jejb; +Cc: MPT-FusionLinux.pdl, linux-scsi, linux-kernel

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 <liheng40@huawei.com>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH -next 3/3] scsi: Remove superfluous memset()
  2020-07-30  3:31 [PATCH -next 0/3] scsi: Remove superfluous memset() Li Heng
  2020-07-30  3:31 ` [PATCH -next 1/3] " Li Heng
  2020-07-30  3:31 ` [PATCH -next 2/3] " Li Heng
@ 2020-07-30  3:31 ` Li Heng
  2020-09-09  2:17 ` [PATCH -next 0/3] " Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Li Heng @ 2020-07-30  3:31 UTC (permalink / raw)
  To: martin.petersen, jejb; +Cc: MPT-FusionLinux.pdl, linux-scsi, linux-kernel

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 <liheng40@huawei.com>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH -next 0/3] scsi: Remove superfluous memset()
  2020-07-30  3:31 [PATCH -next 0/3] scsi: Remove superfluous memset() Li Heng
                   ` (2 preceding siblings ...)
  2020-07-30  3:31 ` [PATCH -next 3/3] " Li Heng
@ 2020-09-09  2:17 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2020-09-09  2:17 UTC (permalink / raw)
  To: Li Heng, jejb
  Cc: Martin K . Petersen, MPT-FusionLinux.pdl, linux-kernel, linux-scsi

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-09  2:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30  3:31 [PATCH -next 0/3] scsi: Remove superfluous memset() Li Heng
2020-07-30  3:31 ` [PATCH -next 1/3] " Li Heng
2020-07-30  3:31 ` [PATCH -next 2/3] " Li Heng
2020-07-30  3:31 ` [PATCH -next 3/3] " Li Heng
2020-09-09  2:17 ` [PATCH -next 0/3] " Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).