dmaengine: idxd: Remove redundant memset() for eventlog allocation
Subsystems (2)
PATCH v2 1/1 dmaengine: idxd: Remove redundant memset() for eventlog allocation
From: Rajeshwar R Shinde <[email protected]>
dma_alloc_coherent function already zeroes the array 'addr'. So, memset function call is not needed.
This fixes warning such as:
drivers/dma/idxd/device.c:783:8-26:
WARNING: dma_alloc_coherent used in addr already zeroes out memory, so memset is not needed.
---v1->v2
Renamed the subject line
--- drivers/dma/idxd/device.c | 2 -- 1 file changed, 2 deletions(-)
drivers/dma/idxd/device.c +0 -2
@@ -786,8 +786,6 @@ static int idxd_device_evl_setup(struct idxd_device *idxd) goto err_alloc; } -memset (addr,0 , size); -spin_lock (&evl->lock); evl->log = addr; evl->dma = dma_addr;
Signature · 6 lines
2.25.1 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 11 lines · On 8/29/23 11:00, [email protected] wrote:
From: Rajeshwar R Shinde <[email protected]>
dma_alloc_coherentfunction already zeroes the array 'addr'. So, memset function call is not needed.This fixes warning such as:
drivers/dma/idxd/device.c:783:8-26:
WARNING:dma_alloc_coherentused in addr already zeroes out memory, so memset is not needed.Signed-off-by Rajeshwar R Shinde <[email protected]>
Quoted 12 lines
---
v1->v2
Renamed the subject line--- drivers/dma/idxd/device.c | 2 -- 1 file changed, 2 deletions(-)drivers/dma/idxd/device.c +0
-0
drivers/dma/idxd/device.c static int idxd_device_evl_setup(struct idxd_device *idxd) · line 791
Quoted 8 lines
drivers/dma/idxd/device.c +0
-2@@ -786,8 +786,6 @@ static int idxd_device_evl_setup(struct idxd_device *idxd) goto err_alloc; } -memset (addr,0 , size); -spin_lock (&evl->lock); evl->log = addr; evl->dma = dma_addr;
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Vinod Koul
maintainerQuoted 9 lines · On 29-08-23, 23:30, [email protected] wrote:
From: Rajeshwar R Shinde <[email protected]>
dma_alloc_coherentfunction already zeroes the array 'addr'. So, memset function call is not needed.This fixes warning such as:
drivers/dma/idxd/device.c:783:8-26:
WARNING:dma_alloc_coherentused in addr already zeroes out memory, so memset is not needed.
Already fixes by 4ca95a5b220c901f9c2402532ef78bf5aaf7d35d
Quoted 24 lines
Signed-off-by Rajeshwar R Shinde <[email protected]>---
v1->v2
Renamed the subject line--- drivers/dma/idxd/device.c | 2 -- 1 file changed, 2 deletions(-)drivers/dma/idxd/device.c +0
-2@@ -786,8 +786,6 @@ static int idxd_device_evl_setup(struct idxd_device *idxd) goto err_alloc; } -memset (addr,0 , size); -spin_lock (&evl->lock); evl->log = addr; evl->dma = dma_addr;Signature · 1 line
2.25.1
Signature · 1 line
~Vinod