Linux-SCSI Archive on
 help / color / Atom feed
* [PATCH] scsi: qla2xxx: Fix the size used in a 'dma_free_coherent()' call
@ 2020-08-02 11:07 Christophe JAILLET
  2020-08-31 17:41 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2020-08-02 11:07 UTC (permalink / raw)
  To: QLogic-Storage-Upstream, jejb, martin.petersen, vikas.chaudhary,
	lalit.chandivade, michaelc, JBottomley
  Cc: linux-scsi, linux-kernel, kernel-janitors, Christophe JAILLET

Update the size used in 'dma_free_coherent()' in order to match the one
used in the corresponding 'dma_alloc_coherent()'.

While at it, remove a memset after a call to 'dma_alloc_coherent()'.
This is useless since
commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*")

Fixes: 4161cee52df8 ("[SCSI] qla4xxx: Add host statistics support")
Signed-off-by: Christophe JAILLET <>
The memset has been added in the same commit, so I think it is ok to
remove it in the same path.
 drivers/scsi/qla2xxx/qla_mbx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 73883435ab58..a43d7229f9a1 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)
-	memset(els_cmd_map, 0, ELS_CMD_MAP_SIZE);
 	/* List of Purex ELS */
 	cmd_opcode[0] = ELS_FPIN;
 	cmd_opcode[1] = ELS_RDP;
@@ -4966,7 +4964,7 @@ qla25xx_set_els_cmds_supported(scsi_qla_host_t *vha)
 		    "Done %s.\n", __func__);
-	dma_free_coherent(&ha->pdev->dev, DMA_POOL_SIZE,
+	dma_free_coherent(&ha->pdev->dev, ELS_CMD_MAP_SIZE,
 	   els_cmd_map, els_cmd_map_dma);
 	return rval;

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-02 11:07 [PATCH] scsi: qla2xxx: Fix the size used in a 'dma_free_coherent()' call Christophe JAILLET
2020-08-31 17:41 ` Martin K. Petersen

Linux-SCSI Archive on

Archives are clonable:
	git clone --mirror 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/ \
	public-inbox-index linux-scsi

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone