diff mbox series

[18/22] net: ethernet: mtk-star-emac: Don't use GFP_DMA when calling dmam_alloc_coherent()

Message ID 20220219005221.634-19-bhe@redhat.com (mailing list archive)
State Not Applicable
Delegated to: Netdev Maintainers
Headers show
Series Don't use kmalloc() with GFP_DMA | expand

Checks

Context Check Description
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count fail Series longer than 15 patches (and no cover letter)
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 8 maintainers not CCed: sean.wang@mediatek.com matthias.bgg@gmail.com kuba@kernel.org linux-arm-kernel@lists.infradead.org Mark-MC.Lee@mediatek.com john@phrozen.org nbd@nbd.name linux-mediatek@lists.infradead.org
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Baoquan He Feb. 19, 2022, 12:52 a.m. UTC
dmam_alloc_coherent() uses struct dma_devres to manage data, and call
dma_alloc_attrs() to allocate cohenrent DMA memory, so it's redundent
to specify GFP_DMA when calling.

Signed-off-by: Baoquan He <bhe@redhat.com>
---
 drivers/net/ethernet/mediatek/mtk_star_emac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christoph Hellwig Feb. 19, 2022, 7:13 a.m. UTC | #1
On Sat, Feb 19, 2022 at 08:52:17AM +0800, Baoquan He wrote:
> dmam_alloc_coherent() uses struct dma_devres to manage data, and call
> dma_alloc_attrs() to allocate cohenrent DMA memory, so it's redundent
> to specify GFP_DMA when calling.

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mediatek/mtk_star_emac.c b/drivers/net/ethernet/mediatek/mtk_star_emac.c
index 89ca7960b225..55b95f51ac75 100644
--- a/drivers/net/ethernet/mediatek/mtk_star_emac.c
+++ b/drivers/net/ethernet/mediatek/mtk_star_emac.c
@@ -1533,7 +1533,7 @@  static int mtk_star_probe(struct platform_device *pdev)
 
 	priv->ring_base = dmam_alloc_coherent(dev, MTK_STAR_DMA_SIZE,
 					      &priv->dma_addr,
-					      GFP_KERNEL | GFP_DMA);
+					      GFP_KERNEL);
 	if (!priv->ring_base)
 		return -ENOMEM;