summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2020-09-01 22:10:28 +0800
committerDavid S. Miller <davem@davemloft.net>2020-09-01 11:47:59 -0700
commit1bac035c59a26e6f6ebbdb399a3b896a6ef9478f (patch)
treef964b3fba3a879b9d1570f3289be4315e4c64426
parentffa81fa46e2de4563350c89fae0c879ed77330d6 (diff)
downloadlinux-1bac035c59a26e6f6ebbdb399a3b896a6ef9478f.tar.bz2
net: sungem: Remove unneeded cast from memory allocation
Remove dma_alloc_coherent return value cast. This is detected by coccinelle. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/sun/sungem.c5
1 files changed, 2 insertions, 3 deletions
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;