dmaengine Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] dmaengine: jz4780: Use devm_platform_ioremap_resource() in jz4780_dma_probe()
@ 2019-09-22  9:25 Markus Elfring
  2019-09-24 19:32 ` Paul Cercueil
  2019-10-14  7:52 ` Vinod Koul
  0 siblings, 2 replies; 5+ messages in thread
From: Markus Elfring @ 2019-09-22  9:25 UTC (permalink / raw)
  To: dmaengine, Dan Williams, Paul Cercueil, Vinod Koul,
	Zubair Lutfullah Kakakhel
  Cc: LKML, kernel-janitors, Alex Smith

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 22 Sep 2019 11:18:27 +0200

Simplify this function implementation a bit 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/dma-jz4780.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c
index cafb1cc065bb..f42b3ef8e036 100644
--- a/drivers/dma/dma-jz4780.c
+++ b/drivers/dma/dma-jz4780.c
@@ -858,13 +858,7 @@ static int jz4780_dma_probe(struct platform_device *pdev)
 	jzdma->soc_data = soc_data;
 	platform_set_drvdata(pdev, jzdma);

-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(dev, "failed to get I/O memory\n");
-		return -EINVAL;
-	}
-
-	jzdma->chn_base = devm_ioremap_resource(dev, res);
+	jzdma->chn_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(jzdma->chn_base))
 		return PTR_ERR(jzdma->chn_base);

--
2.23.0


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

* Re: [PATCH] dmaengine: jz4780: Use devm_platform_ioremap_resource() in jz4780_dma_probe()
  2019-09-22  9:25 [PATCH] dmaengine: jz4780: Use devm_platform_ioremap_resource() in jz4780_dma_probe() Markus Elfring
@ 2019-09-24 19:32 ` Paul Cercueil
  2019-10-14  7:14   ` Vinod Koul
  2019-10-14  7:52 ` Vinod Koul
  1 sibling, 1 reply; 5+ messages in thread
From: Paul Cercueil @ 2019-09-24 19:32 UTC (permalink / raw)
  To: Markus Elfring
  Cc: dmaengine, Dan Williams, Vinod Koul, Zubair Lutfullah Kakakhel,
	LKML, kernel-janitors, Alex Smith

Hi Markus,


Le dim. 22 sept. 2019 à 11:25, Markus Elfring <Markus.Elfring@web.de> 
a écrit :
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 22 Sep 2019 11:18:27 +0200
> 
> Simplify this function implementation a bit by using
> a known wrapper function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Looks good to me.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>


> ---
>  drivers/dma/dma-jz4780.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c
> index cafb1cc065bb..f42b3ef8e036 100644
> --- a/drivers/dma/dma-jz4780.c
> +++ b/drivers/dma/dma-jz4780.c
> @@ -858,13 +858,7 @@ static int jz4780_dma_probe(struct 
> platform_device *pdev)
>  	jzdma->soc_data = soc_data;
>  	platform_set_drvdata(pdev, jzdma);
> 
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(dev, "failed to get I/O memory\n");
> -		return -EINVAL;
> -	}
> -
> -	jzdma->chn_base = devm_ioremap_resource(dev, res);
> +	jzdma->chn_base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(jzdma->chn_base))
>  		return PTR_ERR(jzdma->chn_base);
> 
> --
> 2.23.0
> 



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

* Re: [PATCH] dmaengine: jz4780: Use devm_platform_ioremap_resource() in jz4780_dma_probe()
  2019-09-24 19:32 ` Paul Cercueil
@ 2019-10-14  7:14   ` Vinod Koul
  2019-10-14 13:05     ` Paul Cercueil
  0 siblings, 1 reply; 5+ messages in thread
From: Vinod Koul @ 2019-10-14  7:14 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Markus Elfring, dmaengine, Dan Williams,
	Zubair Lutfullah Kakakhel, LKML, kernel-janitors, Alex Smith

On 24-09-19, 21:32, Paul Cercueil wrote:
> Hi Markus,
> 
> 
> Le dim. 22 sept. 2019 à 11:25, Markus Elfring <Markus.Elfring@web.de> a
> écrit :
> > From: Markus Elfring <elfring@users.sourceforge.net>
> > Date: Sun, 22 Sep 2019 11:18:27 +0200
> > 
> > Simplify this function implementation a bit by using
> > a known wrapper function.
> > 
> > This issue was detected by using the Coccinelle software.
> > 
> > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> 
> Looks good to me.
> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>

Did you mean Acked or Reviewed ...??

-- 
~Vinod

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

* Re: [PATCH] dmaengine: jz4780: Use devm_platform_ioremap_resource() in jz4780_dma_probe()
  2019-09-22  9:25 [PATCH] dmaengine: jz4780: Use devm_platform_ioremap_resource() in jz4780_dma_probe() Markus Elfring
  2019-09-24 19:32 ` Paul Cercueil
@ 2019-10-14  7:52 ` Vinod Koul
  1 sibling, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2019-10-14  7:52 UTC (permalink / raw)
  To: Markus Elfring
  Cc: dmaengine, Dan Williams, Paul Cercueil,
	Zubair Lutfullah Kakakhel, LKML, kernel-janitors, Alex Smith

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

Applied, thanks

-- 
~Vinod

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

* Re: [PATCH] dmaengine: jz4780: Use devm_platform_ioremap_resource() in jz4780_dma_probe()
  2019-10-14  7:14   ` Vinod Koul
@ 2019-10-14 13:05     ` Paul Cercueil
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Cercueil @ 2019-10-14 13:05 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Markus Elfring, dmaengine, Dan Williams,
	Zubair Lutfullah Kakakhel, LKML, kernel-janitors, Alex Smith

Hi Vinod,



Le lun., oct. 14, 2019 at 12:44, Vinod Koul <vkoul@kernel.org> a écrit 
:
> On 24-09-19, 21:32, Paul Cercueil wrote:
>>  Hi Markus,
>> 
>> 
>>  Le dim. 22 sept. 2019 à 11:25, Markus Elfring 
>> <Markus.Elfring@web.de> a
>>  écrit :
>>  > From: Markus Elfring <elfring@users.sourceforge.net>
>>  > Date: Sun, 22 Sep 2019 11:18:27 +0200
>>  >
>>  > Simplify this function implementation a bit by using
>>  > a known wrapper function.
>>  >
>>  > This issue was detected by using the Coccinelle software.
>>  >
>>  > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
>> 
>>  Looks good to me.
>> 
>>  Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> 
> Did you mean Acked or Reviewed ...??

Definitely. Sorry about that.

Reviewed-by: Paul Cercueil <paul@crapouillou.net>


> 
> --
> ~Vinod



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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-22  9:25 [PATCH] dmaengine: jz4780: Use devm_platform_ioremap_resource() in jz4780_dma_probe() Markus Elfring
2019-09-24 19:32 ` Paul Cercueil
2019-10-14  7:14   ` Vinod Koul
2019-10-14 13:05     ` Paul Cercueil
2019-10-14  7:52 ` 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