[PATCH 02/22] net: moxa: Don't use GFP_DMA when calling dma_alloc_coherent()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hyeonggon Yoo <42.hyeyoo@xxxxxxxxx>

dma_alloc_coherent() allocates dma buffer with device's addressing
limitation in mind. It's redundent to specify GFP_DMA when calling
dma_alloc_coherent().

Signed-off-by: Hyeonggon Yoo <42.hyeyoo@xxxxxxxxx>
Signed-off-by: Baoquan He <bhe@xxxxxxxxxx>
---
 drivers/net/ethernet/moxa/moxart_ether.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c
index 15179b9529e1..8fc2c2e71c2d 100644
--- a/drivers/net/ethernet/moxa/moxart_ether.c
+++ b/drivers/net/ethernet/moxa/moxart_ether.c
@@ -495,7 +495,7 @@ static int moxart_mac_probe(struct platform_device *pdev)
 
 	priv->tx_desc_base = dma_alloc_coherent(&pdev->dev, TX_REG_DESC_SIZE *
 						TX_DESC_NUM, &priv->tx_base,
-						GFP_DMA | GFP_KERNEL);
+						GFP_KERNEL);
 	if (!priv->tx_desc_base) {
 		ret = -ENOMEM;
 		goto init_fail;
@@ -503,7 +503,7 @@ static int moxart_mac_probe(struct platform_device *pdev)
 
 	priv->rx_desc_base = dma_alloc_coherent(&pdev->dev, RX_REG_DESC_SIZE *
 						RX_DESC_NUM, &priv->rx_base,
-						GFP_DMA | GFP_KERNEL);
+						GFP_KERNEL);
 	if (!priv->rx_desc_base) {
 		ret = -ENOMEM;
 		goto init_fail;
-- 
2.17.2




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux