* [PATCH v2] dmaengine: idxd: Remove redundant memset() for eventlog allocation
@ 2023-08-29 18:00 coolrrsh
2023-08-29 18:11 ` Dave Jiang
2023-10-04 13:48 ` Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: coolrrsh @ 2023-08-29 18:00 UTC (permalink / raw)
To: fenghua.yu, dave.jiang, vkoul, dmaengine, linux-kernel
Cc: linux-kernel-mentees, Rajeshwar R Shinde
From: Rajeshwar R Shinde <coolrrsh@gmail.com>
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.
Signed-off-by: Rajeshwar R Shinde <coolrrsh@gmail.com>
---
v1->v2
Renamed the subject line
---
drivers/dma/idxd/device.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
index 5abbcc61c528..7c74bc60f582 100644
--- a/drivers/dma/idxd/device.c
+++ b/drivers/dma/idxd/device.c
@@ -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;
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] dmaengine: idxd: Remove redundant memset() for eventlog allocation
2023-08-29 18:00 [PATCH v2] dmaengine: idxd: Remove redundant memset() for eventlog allocation coolrrsh
@ 2023-08-29 18:11 ` Dave Jiang
2023-10-04 13:48 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Dave Jiang @ 2023-08-29 18:11 UTC (permalink / raw)
To: coolrrsh, fenghua.yu, vkoul, dmaengine, linux-kernel; +Cc: linux-kernel-mentees
On 8/29/23 11:00, coolrrsh@gmail.com wrote:
> From: Rajeshwar R Shinde <coolrrsh@gmail.com>
>
> 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.
>
> Signed-off-by: Rajeshwar R Shinde <coolrrsh@gmail.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> v1->v2
> Renamed the subject line
> ---
> drivers/dma/idxd/device.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
> index 5abbcc61c528..7c74bc60f582 100644
> --- a/drivers/dma/idxd/device.c
> +++ b/drivers/dma/idxd/device.c
> @@ -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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] dmaengine: idxd: Remove redundant memset() for eventlog allocation
2023-08-29 18:00 [PATCH v2] dmaengine: idxd: Remove redundant memset() for eventlog allocation coolrrsh
2023-08-29 18:11 ` Dave Jiang
@ 2023-10-04 13:48 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2023-10-04 13:48 UTC (permalink / raw)
To: coolrrsh
Cc: fenghua.yu, dave.jiang, dmaengine, linux-kernel,
linux-kernel-mentees
On 29-08-23, 23:30, coolrrsh@gmail.com wrote:
> From: Rajeshwar R Shinde <coolrrsh@gmail.com>
>
> 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.
Already fixes by 4ca95a5b220c901f9c2402532ef78bf5aaf7d35d
>
> Signed-off-by: Rajeshwar R Shinde <coolrrsh@gmail.com>
> ---
> v1->v2
> Renamed the subject line
> ---
> drivers/dma/idxd/device.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
> index 5abbcc61c528..7c74bc60f582 100644
> --- a/drivers/dma/idxd/device.c
> +++ b/drivers/dma/idxd/device.c
> @@ -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;
> --
> 2.25.1
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-04 13:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-29 18:00 [PATCH v2] dmaengine: idxd: Remove redundant memset() for eventlog allocation coolrrsh
2023-08-29 18:11 ` Dave Jiang
2023-10-04 13:48 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox