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
@@ -1308,13 +1308,13 @@ static int tsi108_open(struct net_device *dev)
|
||||
data->id, dev->irq, dev->name);
|
||||
}
|
||||
|
||||
data->rxring = dma_alloc_coherent(NULL, rxring_size, &data->rxdma,
|
||||
GFP_KERNEL | __GFP_ZERO);
|
||||
data->rxring = dma_zalloc_coherent(NULL, rxring_size, &data->rxdma,
|
||||
GFP_KERNEL);
|
||||
if (!data->rxring)
|
||||
return -ENOMEM;
|
||||
|
||||
data->txring = dma_alloc_coherent(NULL, txring_size, &data->txdma,
|
||||
GFP_KERNEL | __GFP_ZERO);
|
||||
data->txring = dma_zalloc_coherent(NULL, txring_size, &data->txdma,
|
||||
GFP_KERNEL);
|
||||
if (!data->txring) {
|
||||
pci_free_consistent(0, rxring_size, data->rxring, data->rxdma);
|
||||
return -ENOMEM;
|
||||
|
Reference in New Issue
Block a user