dmaengine Archive on
 help / color / Atom feed
* [PATCH] dmaengine: milbeaut-hdmac: fix devm_platform_ioremap_resource.cocci warnings
@ 2019-09-10 10:03 Julia Lawall
  0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2019-09-10 10:03 UTC (permalink / raw)
  To: jassisinghbrar
  Cc: dmaengine, devicetree, linux-kernel, vkoul, robh+dt,
	masami.hiramatsu, orito.takao, Jassi Brar, kbuild-all

From: kbuild test robot <>

Use devm_platform_ioremap_resource helper which wraps
platform_get_resource() and devm_ioremap_resource() together.

Generated by: scripts/coccinelle/api/devm_platform_ioremap_resource.cocci

Fixes: 7cff81f3886d ("dmaengine: milbeaut-hdmac: Add HDMAC driver for Milbeaut platforms")
CC: Jassi Brar <>
Signed-off-by: kbuild test robot <>
Signed-off-by: Julia Lawall <>

:::::: branch date: 2 hours ago
:::::: commit date: 2 hours ago

Please take the patch only if it's a positive warning. Thanks!

 milbeaut-hdmac.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/drivers/dma/milbeaut-hdmac.c
+++ b/drivers/dma/milbeaut-hdmac.c
@@ -461,7 +461,6 @@ static int milbeaut_hdmac_probe(struct p
 	struct device *dev = &pdev->dev;
 	struct milbeaut_hdmac_device *mdev;
 	struct dma_device *ddev;
-	struct resource *res;
 	int nr_chans, ret, i;

 	nr_chans = platform_irq_count(pdev);
@@ -477,8 +476,7 @@ static int milbeaut_hdmac_probe(struct p
 	if (!mdev)
 		return -ENOMEM;

-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mdev->reg_base = devm_ioremap_resource(dev, res);
+	mdev->reg_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(mdev->reg_base))
 		return PTR_ERR(mdev->reg_base);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-10 10:03 [PATCH] dmaengine: milbeaut-hdmac: fix devm_platform_ioremap_resource.cocci warnings Julia Lawall

dmaengine Archive on

Archives are clonable:
	git clone --mirror dmaengine/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dmaengine dmaengine/ \
	public-inbox-index dmaengine

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox