dmaengine Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] dmaengine: zx: Use devm_platform_ioremap_resource() in zx_dma_probe()
@ 2019-09-22 12:37 Markus Elfring
  2019-10-07 12:25 ` Shawn Guo
  2019-10-14  7:53 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Markus Elfring @ 2019-09-22 12:37 UTC (permalink / raw)
  To: dmaengine, linux-arm-kernel, Dan Williams, Jun Nie, Shawn Guo,
	Vinod Koul, LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 22 Sep 2019 14:32:12 +0200

Simplify this function implementation by using a known wrapper function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/dma/zx_dma.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/dma/zx_dma.c b/drivers/dma/zx_dma.c
index 9f4436f7c914..6b457e683e70 100644
--- a/drivers/dma/zx_dma.c
+++ b/drivers/dma/zx_dma.c
@@ -754,18 +754,13 @@ static struct dma_chan *zx_of_dma_simple_xlate(struct of_phandle_args *dma_spec,
 static int zx_dma_probe(struct platform_device *op)
 {
 	struct zx_dma_dev *d;
-	struct resource *iores;
 	int i, ret = 0;

-	iores = platform_get_resource(op, IORESOURCE_MEM, 0);
-	if (!iores)
-		return -EINVAL;
-
 	d = devm_kzalloc(&op->dev, sizeof(*d), GFP_KERNEL);
 	if (!d)
 		return -ENOMEM;

-	d->base = devm_ioremap_resource(&op->dev, iores);
+	d->base = devm_platform_ioremap_resource(op, 0);
 	if (IS_ERR(d->base))
 		return PTR_ERR(d->base);

--
2.23.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dmaengine: zx: Use devm_platform_ioremap_resource() in zx_dma_probe()
  2019-09-22 12:37 [PATCH] dmaengine: zx: Use devm_platform_ioremap_resource() in zx_dma_probe() Markus Elfring
@ 2019-10-07 12:25 ` Shawn Guo
  2019-10-14  7:53 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2019-10-07 12:25 UTC (permalink / raw)
  To: Markus Elfring
  Cc: dmaengine, linux-arm-kernel, Dan Williams, Jun Nie, Vinod Koul,
	LKML, kernel-janitors

On Sun, Sep 22, 2019 at 02:37:13PM +0200, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 22 Sep 2019 14:32:12 +0200
> 
> Simplify this function implementation by using a known wrapper function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Acked-by: Shawn Guo <shawnguo@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dmaengine: zx: Use devm_platform_ioremap_resource() in zx_dma_probe()
  2019-09-22 12:37 [PATCH] dmaengine: zx: Use devm_platform_ioremap_resource() in zx_dma_probe() Markus Elfring
  2019-10-07 12:25 ` Shawn Guo
@ 2019-10-14  7:53 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2019-10-14  7:53 UTC (permalink / raw)
  To: Markus Elfring
  Cc: dmaengine, linux-arm-kernel, Dan Williams, Jun Nie, Shawn Guo,
	LKML, kernel-janitors

On 22-09-19, 14:37, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 22 Sep 2019 14:32:12 +0200
> 
> Simplify this function implementation by using a known wrapper function.
> 
> This issue was detected by using the Coccinelle software.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-22 12:37 [PATCH] dmaengine: zx: Use devm_platform_ioremap_resource() in zx_dma_probe() Markus Elfring
2019-10-07 12:25 ` Shawn Guo
2019-10-14  7:53 ` Vinod Koul

dmaengine Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dmaengine/0 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/ https://lore.kernel.org/dmaengine \
		dmaengine@vger.kernel.org dmaengine@archiver.kernel.org
	public-inbox-index dmaengine

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.dmaengine


AGPL code for this site: git clone https://public-inbox.org/ public-inbox