[PATCH 71/87] scsi: 3w-xxxx: remove memset after dma_alloc_coherent
From: Fuqian Huang
Date: Thu Jun 27 2019 - 13:46:27 EST
In commit af7ddd8a627c
("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"),
dma_alloc_coherent has already zeroed the memory.
So memset is not needed.
Signed-off-by: Fuqian Huang <huangfq.daxian@xxxxxxxxx>
---
drivers/scsi/3w-9xxx.c | 2 --
drivers/scsi/3w-xxxx.c | 2 --
2 files changed, 4 deletions(-)
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index 3337b1e80412..da17d9104e6b 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -534,8 +534,6 @@ static int twa_allocate_memory(TW_Device_Extension *tw_dev, int size, int which)
goto out;
}
- memset(cpu_addr, 0, size*TW_Q_LENGTH);
-
for (i = 0; i < TW_Q_LENGTH; i++) {
switch(which) {
case 0:
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
index 2b1e0d503020..26703ef52a2e 100644
--- a/drivers/scsi/3w-xxxx.c
+++ b/drivers/scsi/3w-xxxx.c
@@ -848,8 +848,6 @@ static int tw_allocate_memory(TW_Device_Extension *tw_dev, int size, int which)
return 1;
}
- memset(cpu_addr, 0, size*TW_Q_LENGTH);
-
for (i=0;i<TW_Q_LENGTH;i++) {
switch(which) {
case 0:
--
2.11.0