aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sgi
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-08-26 22:45:23 -0700
committerDavid S. Miller <davem@davemloft.net>2013-08-29 21:55:23 -0400
commitede23fa8161c1a04aa1b3bf5447812ca14b3fef1 (patch)
tree783051ba0b2e2c7e4b9f8c5bca53282cb2ad314e /drivers/net/ethernet/sgi
parentpkt_sched: fq: Fair Queue packet scheduler (diff)
downloadlinux-dev-ede23fa8161c1a04aa1b3bf5447812ca14b3fef1.tar.xz
linux-dev-ede23fa8161c1a04aa1b3bf5447812ca14b3fef1.zip
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>
Diffstat (limited to 'drivers/net/ethernet/sgi')
-rw-r--r--drivers/net/ethernet/sgi/meth.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sgi/meth.c b/drivers/net/ethernet/sgi/meth.c
index 9f5f35e041ac..770036bc2d87 100644
--- a/drivers/net/ethernet/sgi/meth.c
+++ b/drivers/net/ethernet/sgi/meth.c
@@ -212,9 +212,8 @@ static void meth_check_link(struct net_device *dev)
static int meth_init_tx_ring(struct meth_private *priv)
{
/* Init TX ring */
- priv->tx_ring = dma_alloc_coherent(NULL, TX_RING_BUFFER_SIZE,
- &priv->tx_ring_dma,
- GFP_ATOMIC | __GFP_ZERO);
+ priv->tx_ring = dma_zalloc_coherent(NULL, TX_RING_BUFFER_SIZE,
+ &priv->tx_ring_dma, GFP_ATOMIC);
if (!priv->tx_ring)
return -ENOMEM;