# \[PATCH v3 24/24\] video: fbdev-MMP: Remove call to memset after dma\_alloc\_coherent

- Subsystems: FRAMEBUFFER LAYER, THE REST
- Maintainers: Helge Deller, Linus Torvalds
- Status: LANDED (8cbff03bb090 · 2019-07-23 15:17)
- Landed in mainline as 8cbff03bb090 on 2019-07-23.
- List: linux-fbdev
- 3 messages, 3 authors
- Page: https://ratatoskr.run/linux-fbdev/2019/07/5655019/t

## \[PATCH v3 24/24\] video: fbdev-MMP: Remove call to memset after dma\_alloc\_coherent

- From: Fuqian Huang \<hidden\>
- Date: 2019-07-15 03:20:26 
- Message: https://ratatoskr.run/linux-fbdev/2019/07/5655019.md

```text
In commit 518a2f1925c3
("dma-mapping: zero memory returned from dma_alloc_*"),
dma_alloc_coherent has already zeroed the memory.
So memset is not needed.

Signed-off-by: Fuqian Huang <redacted>
---
Changes in v3:
  - Use actual commit rather than the merge commit in the commit message

 drivers/video/fbdev/mmp/fb/mmpfb.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/video/fbdev/mmp/fb/mmpfb.c b/drivers/video/fbdev/mmp/fb/mmpfb.c
index e5b56f2199df..47bc7c59bbd8 100644
--- a/drivers/video/fbdev/mmp/fb/mmpfb.c
+++ b/drivers/video/fbdev/mmp/fb/mmpfb.c
@@ -612,7 +612,6 @@ static int mmpfb_probe(struct platform_device *pdev)
 		ret = -ENOMEM;
 		goto failed_destroy_mutex;
 	}
-	memset(fbi->fb_start, 0, fbi->fb_size);
 	dev_info(fbi->dev, "fb %dk allocated\n", fbi->fb_size/1024);
 
 	/* fb power on */
-- 
2.11.0
```

## Re: \[PATCH v3 24/24\] video: fbdev-MMP: Remove call to memset after dma\_alloc\_coherent

- From: Emil Velikov \<hidden\>
- Date: 2019-07-15 10:40:55 
- Message: https://ratatoskr.run/linux-fbdev/2019/07/5655198.md

```text
On 2019/07/15, Fuqian Huang wrote:
> In commit 518a2f1925c3
> ("dma-mapping: zero memory returned from dma_alloc_*"),
> dma_alloc_coherent has already zeroed the memory.
> So memset is not needed.
> 
> Signed-off-by: Fuqian Huang <redacted>
> ---
> Changes in v3:
>   - Use actual commit rather than the merge commit in the commit message
> 
>  drivers/video/fbdev/mmp/fb/mmpfb.c | 1 -
>  1 file changed, 1 deletion(-)
> 

Reviewed-by: Emil Velikov <redacted>

-Emil
```

## Re: \[PATCH v3 24/24\] video: fbdev-MMP: Remove call to memset after dma\_alloc\_coherent

- From: Bartlomiej Zolnierkiewicz \<hidden\>
- Date: 2019-07-23 15:37:12 
- Message: https://ratatoskr.run/linux-fbdev/2019/07/5663259.md

```text

On 7/15/19 12:40 PM, Emil Velikov wrote:
> On 2019/07/15, Fuqian Huang wrote:
>> In commit 518a2f1925c3
>> ("dma-mapping: zero memory returned from dma_alloc_*"),
>> dma_alloc_coherent has already zeroed the memory.
>> So memset is not needed.
>>
>> Signed-off-by: Fuqian Huang <redacted>
>> ---
>> Changes in v3:
>>   - Use actual commit rather than the merge commit in the commit message
>>
>>  drivers/video/fbdev/mmp/fb/mmpfb.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
> 
> Reviewed-by: Emil Velikov <redacted>
Patch queued for v5.4, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
```
