Linux-SCSI Archive on lore.kernel.org
 help / color / 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
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ 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] 4+ 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
  2020-07-30  3:31 ` [PATCH -next 3/3] " Li Heng
  2 siblings, 0 replies; 4+ 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	[flat|nested] 4+ 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
  2 siblings, 0 replies; 4+ 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	[flat|nested] 4+ 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
  2 siblings, 0 replies; 4+ 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	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ 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

Linux-SCSI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-scsi/0 linux-scsi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-scsi linux-scsi/ https://lore.kernel.org/linux-scsi \
		linux-scsi@vger.kernel.org
	public-inbox-index linux-scsi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-scsi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git