From: YueHaibing Date: Tue, 1 Sep 2020 14:10:28 +0000 (+0800) Subject: net: sungem: Remove unneeded cast from memory allocation X-Git-Tag: io_uring-5.10-2020-10-20~32^2~396 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=1bac035c59a26e6f6ebbdb399a3b896a6ef9478f;p=linux-2.6-block.git net: sungem: Remove unneeded cast from memory allocation Remove dma_alloc_coherent return value cast. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/sun/sungem.c b/drivers/net/ethernet/sun/sungem.c index eeb8518c8a84..b7093975b14c 100644 --- a/drivers/net/ethernet/sun/sungem.c +++ b/drivers/net/ethernet/sun/sungem.c @@ -2965,9 +2965,8 @@ static int gem_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) /* It is guaranteed that the returned buffer will be at least * PAGE_SIZE aligned. */ - gp->init_block = (struct gem_init_block *) - dma_alloc_coherent(&pdev->dev, sizeof(struct gem_init_block), - &gp->gblock_dvma, GFP_KERNEL); + gp->init_block = dma_alloc_coherent(&pdev->dev, sizeof(struct gem_init_block), + &gp->gblock_dvma, GFP_KERNEL); if (!gp->init_block) { pr_err("Cannot allocate init block, aborting\n"); err = -ENOMEM;