* [PATCH 1/5] dmaengine: qcom: gpi: Use devm_platform_get_and_ioremap_resource()
@ 2023-07-05 8:18 Yangtao Li
2023-07-05 8:18 ` [PATCH 2/5] dmaengine: qcom_hidma: " Yangtao Li
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Yangtao Li @ 2023-07-05 8:18 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Vinod Koul
Cc: Yangtao Li, linux-arm-msm, dmaengine, linux-kernel
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/dma/qcom/gpi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c
index 932628b319c8..1c93864e0e4d 100644
--- a/drivers/dma/qcom/gpi.c
+++ b/drivers/dma/qcom/gpi.c
@@ -2160,8 +2160,7 @@ static int gpi_probe(struct platform_device *pdev)
return -ENOMEM;
gpi_dev->dev = &pdev->dev;
- gpi_dev->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- gpi_dev->regs = devm_ioremap_resource(gpi_dev->dev, gpi_dev->res);
+ gpi_dev->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &gpi_dev->res);
if (IS_ERR(gpi_dev->regs))
return PTR_ERR(gpi_dev->regs);
gpi_dev->ee_base = gpi_dev->regs;
--
2.39.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 2/5] dmaengine: qcom_hidma: Use devm_platform_get_and_ioremap_resource() 2023-07-05 8:18 [PATCH 1/5] dmaengine: qcom: gpi: Use devm_platform_get_and_ioremap_resource() Yangtao Li @ 2023-07-05 8:18 ` Yangtao Li 2023-07-05 8:18 ` [PATCH 3/5] dmaengine: qcom: hidma_mgmt: " Yangtao Li 2023-07-11 16:43 ` [PATCH 1/5] dmaengine: qcom: gpi: " Vinod Koul 2 siblings, 0 replies; 8+ messages in thread From: Yangtao Li @ 2023-07-05 8:18 UTC (permalink / raw) To: Sinan Kaya, Andy Gross, Bjorn Andersson, Konrad Dybcio, Vinod Koul Cc: Yangtao Li, linux-arm-kernel, linux-arm-msm, dmaengine, linux-kernel Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li <frank.li@vivo.com> --- drivers/dma/qcom/hidma.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c index 344525c3a32f..b5e3633e6a5e 100644 --- a/drivers/dma/qcom/hidma.c +++ b/drivers/dma/qcom/hidma.c @@ -765,17 +765,15 @@ static int hidma_probe(struct platform_device *pdev) pm_runtime_set_active(&pdev->dev); pm_runtime_enable(&pdev->dev); - trca_resource = platform_get_resource(pdev, IORESOURCE_MEM, 0); - trca = devm_ioremap_resource(&pdev->dev, trca_resource); + trca = devm_platform_get_and_ioremap_resource(pdev, 0, &trca_resource); if (IS_ERR(trca)) { - rc = -ENOMEM; + rc = PTR_ERR(trca); goto bailout; } - evca_resource = platform_get_resource(pdev, IORESOURCE_MEM, 1); - evca = devm_ioremap_resource(&pdev->dev, evca_resource); + evca = devm_platform_get_and_ioremap_resource(pdev, 1, &evca_resource); if (IS_ERR(evca)) { - rc = -ENOMEM; + rc = PTR_ERR(evca); goto bailout; } @@ -785,7 +783,7 @@ static int hidma_probe(struct platform_device *pdev) */ chirq = platform_get_irq(pdev, 0); if (chirq < 0) { - rc = -ENODEV; + rc = chirq; goto bailout; } -- 2.39.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/5] dmaengine: qcom: hidma_mgmt: Use devm_platform_get_and_ioremap_resource() 2023-07-05 8:18 [PATCH 1/5] dmaengine: qcom: gpi: Use devm_platform_get_and_ioremap_resource() Yangtao Li 2023-07-05 8:18 ` [PATCH 2/5] dmaengine: qcom_hidma: " Yangtao Li @ 2023-07-05 8:18 ` Yangtao Li 2023-07-11 16:43 ` [PATCH 1/5] dmaengine: qcom: gpi: " Vinod Koul 2 siblings, 0 replies; 8+ messages in thread From: Yangtao Li @ 2023-07-05 8:18 UTC (permalink / raw) To: Sinan Kaya, Andy Gross, Bjorn Andersson, Konrad Dybcio, Vinod Koul Cc: Yangtao Li, linux-arm-kernel, linux-arm-msm, dmaengine, linux-kernel Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li <frank.li@vivo.com> --- drivers/dma/qcom/hidma_mgmt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/dma/qcom/hidma_mgmt.c b/drivers/dma/qcom/hidma_mgmt.c index 05e96b31d871..1d675f31252b 100644 --- a/drivers/dma/qcom/hidma_mgmt.c +++ b/drivers/dma/qcom/hidma_mgmt.c @@ -176,10 +176,9 @@ static int hidma_mgmt_probe(struct platform_device *pdev) pm_runtime_enable(&pdev->dev); pm_runtime_get_sync(&pdev->dev); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - virtaddr = devm_ioremap_resource(&pdev->dev, res); + virtaddr = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(virtaddr)) { - rc = -ENOMEM; + rc = PTR_ERR(virtaddr); goto out; } -- 2.39.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/5] dmaengine: qcom: gpi: Use devm_platform_get_and_ioremap_resource() 2023-07-05 8:18 [PATCH 1/5] dmaengine: qcom: gpi: Use devm_platform_get_and_ioremap_resource() Yangtao Li 2023-07-05 8:18 ` [PATCH 2/5] dmaengine: qcom_hidma: " Yangtao Li 2023-07-05 8:18 ` [PATCH 3/5] dmaengine: qcom: hidma_mgmt: " Yangtao Li @ 2023-07-11 16:43 ` Vinod Koul 2023-07-12 9:33 ` Geert Uytterhoeven 2 siblings, 1 reply; 8+ messages in thread From: Vinod Koul @ 2023-07-11 16:43 UTC (permalink / raw) To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Yangtao Li Cc: linux-arm-msm, dmaengine, linux-kernel On Wed, 05 Jul 2023 16:18:52 +0800, Yangtao Li wrote: > Convert platform_get_resource(), devm_ioremap_resource() to a single > call to devm_platform_get_and_ioremap_resource(), as this is exactly > what this function does. > > Applied, thanks! [1/5] dmaengine: qcom: gpi: Use devm_platform_get_and_ioremap_resource() commit: d9313d9f1fbc14cae5147c5130bea54aa76ad65f [2/5] dmaengine: qcom_hidma: Use devm_platform_get_and_ioremap_resource() commit: a189107deb574fd08018bbf2fe5cd86450a54b13 [3/5] dmaengine: qcom: hidma_mgmt: Use devm_platform_get_and_ioremap_resource() commit: fe6c2622473f3756a09bd6c42cffca6fbdce391c [4/5] dmaengine: shdmac: Convert to devm_platform_ioremap_resource() commit: 0976421c5a339b1b1a89cfba4471a6de761130ed [5/5] dmaengine: stm32-dma: Use devm_platform_get_and_ioremap_resource() commit: b402a7eeaa35aaa3300a4ba6bd5b381112ae183c Best regards, -- ~Vinod ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/5] dmaengine: qcom: gpi: Use devm_platform_get_and_ioremap_resource() 2023-07-11 16:43 ` [PATCH 1/5] dmaengine: qcom: gpi: " Vinod Koul @ 2023-07-12 9:33 ` Geert Uytterhoeven 2023-07-12 11:30 ` Vinod Koul 0 siblings, 1 reply; 8+ messages in thread From: Geert Uytterhoeven @ 2023-07-12 9:33 UTC (permalink / raw) To: Vinod Koul Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Yangtao Li, linux-arm-msm, dmaengine, linux-kernel, linux-phy Hi Vinod, On Tue, 11 Jul 2023, Vinod Koul wrote: > On Wed, 05 Jul 2023 16:18:52 +0800, Yangtao Li wrote: >> Convert platform_get_resource(), devm_ioremap_resource() to a single >> call to devm_platform_get_and_ioremap_resource(), as this is exactly >> what this function does. >> >> > > Applied, thanks! > > [1/5] dmaengine: qcom: gpi: Use devm_platform_get_and_ioremap_resource() > commit: d9313d9f1fbc14cae5147c5130bea54aa76ad65f > [2/5] dmaengine: qcom_hidma: Use devm_platform_get_and_ioremap_resource() > commit: a189107deb574fd08018bbf2fe5cd86450a54b13 > [3/5] dmaengine: qcom: hidma_mgmt: Use devm_platform_get_and_ioremap_resource() > commit: fe6c2622473f3756a09bd6c42cffca6fbdce391c > [4/5] dmaengine: shdmac: Convert to devm_platform_ioremap_resource() > commit: 0976421c5a339b1b1a89cfba4471a6de761130ed > [5/5] dmaengine: stm32-dma: Use devm_platform_get_and_ioremap_resource() > commit: b402a7eeaa35aaa3300a4ba6bd5b381112ae183c I noticed all your new dmaengine[1] and phy[2] commits contain a "Message-ID:" tag. Presumable you added a git hook for that? However, the standard way is to add a Link: tag pointing to lore instead, cfr. [3]. Thanks! [1] https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git/commit/?h=next [2] https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git/commit/?h=next [3] https://docs.kernel.org/maintainer/configure-git.html#creating-commit-links-to-lore-kernel-org Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/5] dmaengine: qcom: gpi: Use devm_platform_get_and_ioremap_resource() 2023-07-12 9:33 ` Geert Uytterhoeven @ 2023-07-12 11:30 ` Vinod Koul 2023-07-13 8:00 ` Geert Uytterhoeven 0 siblings, 1 reply; 8+ messages in thread From: Vinod Koul @ 2023-07-12 11:30 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Yangtao Li, linux-arm-msm, dmaengine, linux-kernel, linux-phy On 12-07-23, 11:33, Geert Uytterhoeven wrote: > Hi Vinod, > > On Tue, 11 Jul 2023, Vinod Koul wrote: > > On Wed, 05 Jul 2023 16:18:52 +0800, Yangtao Li wrote: > > > Convert platform_get_resource(), devm_ioremap_resource() to a single > > > call to devm_platform_get_and_ioremap_resource(), as this is exactly > > > what this function does. > > > > > > > > > > Applied, thanks! > > > > [1/5] dmaengine: qcom: gpi: Use devm_platform_get_and_ioremap_resource() > > commit: d9313d9f1fbc14cae5147c5130bea54aa76ad65f > > [2/5] dmaengine: qcom_hidma: Use devm_platform_get_and_ioremap_resource() > > commit: a189107deb574fd08018bbf2fe5cd86450a54b13 > > [3/5] dmaengine: qcom: hidma_mgmt: Use devm_platform_get_and_ioremap_resource() > > commit: fe6c2622473f3756a09bd6c42cffca6fbdce391c > > [4/5] dmaengine: shdmac: Convert to devm_platform_ioremap_resource() > > commit: 0976421c5a339b1b1a89cfba4471a6de761130ed > > [5/5] dmaengine: stm32-dma: Use devm_platform_get_and_ioremap_resource() > > commit: b402a7eeaa35aaa3300a4ba6bd5b381112ae183c > > I noticed all your new dmaengine[1] and phy[2] commits contain a > "Message-ID:" tag. Presumable you added a git hook for that? Thanks for pointing that out, yes something is messed up for me. > > However, the standard way is to add a Link: tag pointing to lore > instead, cfr. [3]. Yep and if you look at the dmaengine and phy commits for 6.4 they have "Link" in them, so something is not working, let me fix that up. -- ~Vinod ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/5] dmaengine: qcom: gpi: Use devm_platform_get_and_ioremap_resource() 2023-07-12 11:30 ` Vinod Koul @ 2023-07-13 8:00 ` Geert Uytterhoeven 2023-07-13 17:52 ` Vinod Koul 0 siblings, 1 reply; 8+ messages in thread From: Geert Uytterhoeven @ 2023-07-13 8:00 UTC (permalink / raw) To: Vinod Koul Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Yangtao Li, linux-arm-msm, dmaengine, linux-kernel, linux-phy Hi Vinod, On Wed, Jul 12, 2023 at 1:30 PM Vinod Koul <vkoul@kernel.org> wrote: > On 12-07-23, 11:33, Geert Uytterhoeven wrote: > > On Tue, 11 Jul 2023, Vinod Koul wrote: > > > On Wed, 05 Jul 2023 16:18:52 +0800, Yangtao Li wrote: > > > > Convert platform_get_resource(), devm_ioremap_resource() to a single > > > > call to devm_platform_get_and_ioremap_resource(), as this is exactly > > > > what this function does. > > > > > > Applied, thanks! > > > > > > [1/5] dmaengine: qcom: gpi: Use devm_platform_get_and_ioremap_resource() > > > commit: d9313d9f1fbc14cae5147c5130bea54aa76ad65f > > > [2/5] dmaengine: qcom_hidma: Use devm_platform_get_and_ioremap_resource() > > > commit: a189107deb574fd08018bbf2fe5cd86450a54b13 > > > [3/5] dmaengine: qcom: hidma_mgmt: Use devm_platform_get_and_ioremap_resource() > > > commit: fe6c2622473f3756a09bd6c42cffca6fbdce391c > > > [4/5] dmaengine: shdmac: Convert to devm_platform_ioremap_resource() > > > commit: 0976421c5a339b1b1a89cfba4471a6de761130ed > > > [5/5] dmaengine: stm32-dma: Use devm_platform_get_and_ioremap_resource() > > > commit: b402a7eeaa35aaa3300a4ba6bd5b381112ae183c > > > > I noticed all your new dmaengine[1] and phy[2] commits contain a > > "Message-ID:" tag. Presumable you added a git hook for that? > > Thanks for pointing that out, yes something is messed up for me. > > > However, the standard way is to add a Link: tag pointing to lore > > instead, cfr. [3]. > > Yep and if you look at the dmaengine and phy commits for 6.4 they have > "Link" in them, so something is not working, let me fix that up. Sorry, hadn't noticed that, so I assumed you were a new user ;-) I saw you have already updated your branches, but FTR, the issue was caused by a new version of git, which broke the hook, cfr. commit 2bb19e740e9b3eb4 ("Documentation: update git configuration for Link: tag") in v6.5-rc1. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/5] dmaengine: qcom: gpi: Use devm_platform_get_and_ioremap_resource() 2023-07-13 8:00 ` Geert Uytterhoeven @ 2023-07-13 17:52 ` Vinod Koul 0 siblings, 0 replies; 8+ messages in thread From: Vinod Koul @ 2023-07-13 17:52 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Yangtao Li, linux-arm-msm, dmaengine, linux-kernel, linux-phy Hi Geert, On 13-07-23, 10:00, Geert Uytterhoeven wrote: > On Wed, Jul 12, 2023 at 1:30 PM Vinod Koul <vkoul@kernel.org> wrote: > > On 12-07-23, 11:33, Geert Uytterhoeven wrote: > > > > Thanks for pointing that out, yes something is messed up for me. > > > > > However, the standard way is to add a Link: tag pointing to lore > > > instead, cfr. [3]. > > > > Yep and if you look at the dmaengine and phy commits for 6.4 they have > > "Link" in them, so something is not working, let me fix that up. > > Sorry, hadn't noticed that, so I assumed you were a new user ;-) > > I saw you have already updated your branches, but FTR, the issue > was caused by a new version of git, which broke the hook, cfr. commit > 2bb19e740e9b3eb4 ("Documentation: update git configuration for Link: > tag") in v6.5-rc1. Yes that was exactly the cause, updating my hook fixed it up. Had to fix all the commits in the trees though, thanks -- ~Vinod ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-07-13 17:52 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-07-05 8:18 [PATCH 1/5] dmaengine: qcom: gpi: Use devm_platform_get_and_ioremap_resource() Yangtao Li 2023-07-05 8:18 ` [PATCH 2/5] dmaengine: qcom_hidma: " Yangtao Li 2023-07-05 8:18 ` [PATCH 3/5] dmaengine: qcom: hidma_mgmt: " Yangtao Li 2023-07-11 16:43 ` [PATCH 1/5] dmaengine: qcom: gpi: " Vinod Koul 2023-07-12 9:33 ` Geert Uytterhoeven 2023-07-12 11:30 ` Vinod Koul 2023-07-13 8:00 ` Geert Uytterhoeven 2023-07-13 17:52 ` Vinod Koul
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).