mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/8] usb: ohci-hcd: Do not zero out DMA coherent memory
@ 2019-05-27 18:14 Andrey Smirnov
  2019-05-27 18:14 ` [PATCH 2/8] net: rtl8169: " Andrey Smirnov
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Andrey Smirnov @ 2019-05-27 18:14 UTC (permalink / raw)
  To: barebox; +Cc: Andrey Smirnov

Memory returned by dma_alloc_coherent() should already be zeroed
out, so there's no need to do this explicitly.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/usb/host/ohci-hcd.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 612c3a103..924dc8e1f 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1765,7 +1765,6 @@ static int ohci_init(struct usb_host *host)
 				       DMA_ADDRESS_BROKEN);
 	if (!ohci->ptd)
 		return -ENOMEM;
-	memset(ohci->ptd, 0, sizeof(struct td) * NUM_TD);
 
 	ohci->disabled = 1;
 	ohci->irq = -1;
@@ -1815,7 +1814,6 @@ static int ohci_probe(struct device_d *dev)
 					    DMA_ADDRESS_BROKEN);
 	if (!ohci->ohci_dev)
 		return -ENOMEM;
-	memset(ohci->ohci_dev, 0, sizeof(*ohci->ohci_dev));
 
 	usb_register_host(host);
 
-- 
2.21.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2019-05-28  8:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-27 18:14 [PATCH 1/8] usb: ohci-hcd: Do not zero out DMA coherent memory Andrey Smirnov
2019-05-27 18:14 ` [PATCH 2/8] net: rtl8169: " Andrey Smirnov
2019-05-27 18:14 ` [PATCH 3/8] nand: nand_mxs: " Andrey Smirnov
2019-05-27 18:14 ` [PATCH 4/8] apbh: " Andrey Smirnov
2019-05-27 18:14 ` [PATCH 5/8] ahci: " Andrey Smirnov
2019-05-27 18:14 ` [PATCH 6/8] apbh: Use dma_alloc_coherent() to get DMA address Andrey Smirnov
2019-05-27 18:14 ` [PATCH 7/8] usb: fsl_udc: " Andrey Smirnov
2019-05-27 18:15 ` [PATCH 8/8] usb: ohci: Add dependency on HAS_DMA Andrey Smirnov
2019-05-28  8:38 ` [PATCH 1/8] usb: ohci-hcd: Do not zero out DMA coherent memory Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox