drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent
__GFP_ZERO is an uncommon flag and perhaps is better not used. static inline dma_zalloc_coherent exists so convert the uses of dma_alloc_coherent with __GFP_ZERO to the more common kernel style with zalloc. Remove memset from the static inline dma_zalloc_coherent and add just one use of __GFP_ZERO instead. Trivially reduces the size of the existing uses of dma_zalloc_coherent. Realign arguments as appropriate. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
afe4fd0624
commit
ede23fa816
@@ -440,10 +440,9 @@ static int pasemi_mac_setup_rx_resources(const struct net_device *dev)
|
||||
if (pasemi_dma_alloc_ring(&ring->chan, RX_RING_SIZE))
|
||||
goto out_ring_desc;
|
||||
|
||||
ring->buffers = dma_alloc_coherent(&mac->dma_pdev->dev,
|
||||
RX_RING_SIZE * sizeof(u64),
|
||||
&ring->buf_dma,
|
||||
GFP_KERNEL | __GFP_ZERO);
|
||||
ring->buffers = dma_zalloc_coherent(&mac->dma_pdev->dev,
|
||||
RX_RING_SIZE * sizeof(u64),
|
||||
&ring->buf_dma, GFP_KERNEL);
|
||||
if (!ring->buffers)
|
||||
goto out_ring_desc;
|
||||
|
||||
|
Reference in New Issue
Block a user