[2/2] net: spider_net: Remove a useless memset
diff mbox series

Message ID 20200802135348.691046-1-christophe.jaillet@wanadoo.fr
State Accepted
Commit c23cf402d0bb069310ce75bbf2758ff9c23fbe73
Headers show
Series
  • [1/2] net: spider_net: Fix the size used in a 'dma_free_coherent()' call
Related show

Commit Message

Christophe JAILLET Aug. 2, 2020, 1:53 p.m. UTC
Avoid a memset after a call to 'dma_alloc_coherent()'.
This is useless since
commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*")

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
NOT compile tested, because I don't have the configuration for that
---
 drivers/net/ethernet/toshiba/spider_net.c | 2 --
 1 file changed, 2 deletions(-)

Comments

David Miller Aug. 3, 2020, 11:01 p.m. UTC | #1
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date: Sun,  2 Aug 2020 15:53:48 +0200

> Avoid a memset after a call to 'dma_alloc_coherent()'.
> This is useless since
> commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*")
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Applied.

Patch
diff mbox series

diff --git a/drivers/net/ethernet/toshiba/spider_net.c b/drivers/net/ethernet/toshiba/spider_net.c
index 2d61400144a2..e1a2057fbf21 100644
--- a/drivers/net/ethernet/toshiba/spider_net.c
+++ b/drivers/net/ethernet/toshiba/spider_net.c
@@ -314,8 +314,6 @@  spider_net_init_chain(struct spider_net_card *card,
 	if (!chain->hwring)
 		return -ENOMEM;
 
-	memset(chain->ring, 0, chain->num_desc * sizeof(struct spider_net_descr));
-
 	/* Set up the hardware pointers in each descriptor */
 	descr = chain->ring;
 	hwdescr = chain->hwring;