diff options
author | Joe Perches <joe@perches.com> | 2013-08-27 01:45:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-29 21:55:23 -0400 |
commit | ede23fa8161c1a04aa1b3bf5447812ca14b3fef1 (patch) | |
tree | 783051ba0b2e2c7e4b9f8c5bca53282cb2ad314e /drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | |
parent | afe4fd062416b158a8a8538b23adc1930a9b88dc (diff) |
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/broadcom/bnx2x/bnx2x.h')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h index 12202f81735c..3e77a1b1a44a 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | |||
@@ -2069,9 +2069,8 @@ static inline u32 reg_poll(struct bnx2x *bp, u32 reg, u32 expected, int ms, | |||
2069 | void bnx2x_igu_clear_sb_gen(struct bnx2x *bp, u8 func, u8 idu_sb_id, | 2069 | void bnx2x_igu_clear_sb_gen(struct bnx2x *bp, u8 func, u8 idu_sb_id, |
2070 | bool is_pf); | 2070 | bool is_pf); |
2071 | 2071 | ||
2072 | #define BNX2X_ILT_ZALLOC(x, y, size) \ | 2072 | #define BNX2X_ILT_ZALLOC(x, y, size) \ |
2073 | x = dma_alloc_coherent(&bp->pdev->dev, size, y, \ | 2073 | x = dma_zalloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL) |
2074 | GFP_KERNEL | __GFP_ZERO) | ||
2075 | 2074 | ||
2076 | #define BNX2X_ILT_FREE(x, y, size) \ | 2075 | #define BNX2X_ILT_FREE(x, y, size) \ |
2077 | do { \ | 2076 | do { \ |