lkml.org 
[lkml]   [2013]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH net-next] drivers:net: dma_alloc_coherent: use __GFP_ZERO instead of memset(, 0)
From
Date
On Fri, 2013-03-15 at 22:51 +0000, Abodunrin, Akeem G wrote:
> -----Original Message-----
> From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On Behalf Of Joe Perches
[]
> Reduce the number of calls required to alloc a zeroed block of memory.
[]
> diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
[]
> @@ -488,7 +487,6 @@ int igbvf_setup_rx_resources(struct igbvf_adapter *adapter,
>
> rx_ring->desc = dma_alloc_coherent(&pdev->dev, rx_ring->size,
> &rx_ring->dma, GFP_KERNEL);
> -
> if (!rx_ring->desc)
> goto err;
>
> Hi Joe,

Hello Akeem.

> Your changes did not seem to make it to igbvf/netdev.c - I think
> instead of removing an extra line added for code clarity, you
> want to add:
> "tx_ring->desc = dma_alloc_coherent(&pdev->dev, tx_ring->size,
> &tx_ring->dma, GFP_KERNEL| __GFP_ZERO);"

Not really, there's no memset here so this
bit is just a whitespace neatening.



\
 
 \ /
  Last update: 2013-03-16 05:41    [W:0.103 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site