linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 73/87] ethernet: freescale: Remove memset after dma_alloc_coherent
@ 2019-06-27 17:46 Fuqian Huang
  2019-06-28  2:26 ` [EXT] " Andy Duan
  0 siblings, 1 reply; 2+ messages in thread
From: Fuqian Huang @ 2019-06-27 17:46 UTC (permalink / raw)
  Cc: Fuqian Huang, Fugang Duan, David S. Miller, netdev, linux-kernel

In commit af7ddd8a627c
("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"),
dma_alloc_coherent has already zeroed the memory.
So memset is not needed.

Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
---
 drivers/net/ethernet/freescale/fec_main.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 38f10f7dcbc3..ec87b8b78d21 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -3143,8 +3143,6 @@ static int fec_enet_init(struct net_device *ndev)
 		return -ENOMEM;
 	}
 
-	memset(cbd_base, 0, bd_size);
-
 	/* Get the Ethernet address */
 	fec_get_mac(ndev);
 	/* make sure MAC we just acquired is programmed into the hw */
-- 
2.11.0


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

* RE: [EXT] [PATCH 73/87] ethernet: freescale: Remove memset after dma_alloc_coherent
  2019-06-27 17:46 [PATCH 73/87] ethernet: freescale: Remove memset after dma_alloc_coherent Fuqian Huang
@ 2019-06-28  2:26 ` Andy Duan
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Duan @ 2019-06-28  2:26 UTC (permalink / raw)
  To: Fuqian Huang; +Cc: David S. Miller, netdev, linux-kernel

From: Fuqian Huang <huangfq.daxian@gmail.com> Sent: Friday, June 28, 2019 1:47 AM
> In commit af7ddd8a627c
> ("Merge tag 'dma-mapping-4.21' of
> git://git.infradead.org/users/hch/dma-mapping"),
> dma_alloc_coherent has already zeroed the memory.
> So memset is not needed.
> 
> Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>

Acked-by: Fugang Duan <fugang.duan@nxp.com>
> ---
>  drivers/net/ethernet/freescale/fec_main.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c
> b/drivers/net/ethernet/freescale/fec_main.c
> index 38f10f7dcbc3..ec87b8b78d21 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -3143,8 +3143,6 @@ static int fec_enet_init(struct net_device *ndev)
>                 return -ENOMEM;
>         }
> 
> -       memset(cbd_base, 0, bd_size);
> -
>         /* Get the Ethernet address */
>         fec_get_mac(ndev);
>         /* make sure MAC we just acquired is programmed into the hw */
> --
> 2.11.0


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

end of thread, other threads:[~2019-06-28  2:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-27 17:46 [PATCH 73/87] ethernet: freescale: Remove memset after dma_alloc_coherent Fuqian Huang
2019-06-28  2:26 ` [EXT] " Andy Duan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).