All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] dmaengine: Fix return value for dma_requrest_chan() in case of failure
       [not found] <CGME20200130070850eucas1p1a7a09e2bec2f6fe652f206b61a8a04ae@eucas1p1.samsung.com>
@ 2020-01-30  7:08   ` Marek Szyprowski
  0 siblings, 0 replies; 6+ messages in thread
From: Marek Szyprowski @ 2020-01-30  7:08 UTC (permalink / raw)
  To: dmaengine, alsa-devel, linux-kernel, linux-samsung-soc
  Cc: Marek Szyprowski, Mark Brown, Geert Uytterhoeven, Vinod Koul,
	Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Peter Ujfalusi

Commit 71723a96b8b1 ("dmaengine: Create symlinks between DMA channels and
slaves") changed the dma_request_chan() function flow in such a way that
it always returns EPROBE_DEFER in case of channels that cannot be found.
This break the operation of the devices which have optional DMA channels
as it puts their drivers in endless deferred probe loop. Fix this by
propagating the proper error value.

Fixes: 71723a96b8b1 ("dmaengine: Create symlinks between DMA channels and slaves")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/dma/dmaengine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index f3ef4edd4de1..7b1cefc3213a 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -759,7 +759,7 @@ struct dma_chan *dma_request_chan(struct device *dev, const char *name)
 	if (!IS_ERR_OR_NULL(chan))
 		goto found;
 
-	return ERR_PTR(-EPROBE_DEFER);
+	return chan ? chan : ERR_PTR(-EPROBE_DEFER);
 
 found:
 	chan->slave = dev;
-- 
2.17.1


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

* [alsa-devel] [PATCH v2] dmaengine: Fix return value for dma_requrest_chan() in case of failure
@ 2020-01-30  7:08   ` Marek Szyprowski
  0 siblings, 0 replies; 6+ messages in thread
From: Marek Szyprowski @ 2020-01-30  7:08 UTC (permalink / raw)
  To: dmaengine, alsa-devel, linux-kernel, linux-samsung-soc
  Cc: Geert Uytterhoeven, Bartlomiej Zolnierkiewicz,
	Krzysztof Kozlowski, Peter Ujfalusi, Vinod Koul, Mark Brown,
	Marek Szyprowski

Commit 71723a96b8b1 ("dmaengine: Create symlinks between DMA channels and
slaves") changed the dma_request_chan() function flow in such a way that
it always returns EPROBE_DEFER in case of channels that cannot be found.
This break the operation of the devices which have optional DMA channels
as it puts their drivers in endless deferred probe loop. Fix this by
propagating the proper error value.

Fixes: 71723a96b8b1 ("dmaengine: Create symlinks between DMA channels and slaves")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/dma/dmaengine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index f3ef4edd4de1..7b1cefc3213a 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -759,7 +759,7 @@ struct dma_chan *dma_request_chan(struct device *dev, const char *name)
 	if (!IS_ERR_OR_NULL(chan))
 		goto found;
 
-	return ERR_PTR(-EPROBE_DEFER);
+	return chan ? chan : ERR_PTR(-EPROBE_DEFER);
 
 found:
 	chan->slave = dev;
-- 
2.17.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [PATCH v2] dmaengine: Fix return value for dma_requrest_chan() in case of failure
  2020-01-30  7:08   ` [alsa-devel] " Marek Szyprowski
@ 2020-01-30  8:18     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2020-01-30  8:18 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: dmaengine, ALSA Development Mailing List,
	Linux Kernel Mailing List, linux-samsung-soc, Mark Brown,
	Geert Uytterhoeven, Vinod Koul, Krzysztof Kozlowski,
	Bartlomiej Zolnierkiewicz, Peter Ujfalusi

Hi Marek,

s/dma_requrest_chan/dma_request_chan/ in one-line summary.

On Thu, Jan 30, 2020 at 8:08 AM Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
> Commit 71723a96b8b1 ("dmaengine: Create symlinks between DMA channels and
> slaves") changed the dma_request_chan() function flow in such a way that
> it always returns EPROBE_DEFER in case of channels that cannot be found.
> This break the operation of the devices which have optional DMA channels
> as it puts their drivers in endless deferred probe loop. Fix this by
> propagating the proper error value.
>
> Fixes: 71723a96b8b1 ("dmaengine: Create symlinks between DMA channels and slaves")
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

Sorry for breaking this, and thanks a lot for your fix!

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

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] 6+ messages in thread

* Re: [alsa-devel] [PATCH v2] dmaengine: Fix return value for dma_requrest_chan() in case of failure
@ 2020-01-30  8:18     ` Geert Uytterhoeven
  0 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2020-01-30  8:18 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: ALSA Development Mailing List, linux-samsung-soc,
	Geert Uytterhoeven, Bartlomiej Zolnierkiewicz,
	Linux Kernel Mailing List, Krzysztof Kozlowski, Peter Ujfalusi,
	Vinod Koul, Mark Brown, dmaengine

Hi Marek,

s/dma_requrest_chan/dma_request_chan/ in one-line summary.

On Thu, Jan 30, 2020 at 8:08 AM Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
> Commit 71723a96b8b1 ("dmaengine: Create symlinks between DMA channels and
> slaves") changed the dma_request_chan() function flow in such a way that
> it always returns EPROBE_DEFER in case of channels that cannot be found.
> This break the operation of the devices which have optional DMA channels
> as it puts their drivers in endless deferred probe loop. Fix this by
> propagating the proper error value.
>
> Fixes: 71723a96b8b1 ("dmaengine: Create symlinks between DMA channels and slaves")
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

Sorry for breaking this, and thanks a lot for your fix!

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [PATCH v2] dmaengine: Fix return value for dma_requrest_chan() in case of failure
  2020-01-30  7:08   ` [alsa-devel] " Marek Szyprowski
@ 2020-01-30  8:25     ` Vinod Koul
  -1 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2020-01-30  8:25 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: dmaengine, alsa-devel, linux-kernel, linux-samsung-soc,
	Mark Brown, Geert Uytterhoeven, Krzysztof Kozlowski,
	Bartlomiej Zolnierkiewicz, Peter Ujfalusi

On 30-01-20, 08:08, Marek Szyprowski wrote:
> Commit 71723a96b8b1 ("dmaengine: Create symlinks between DMA channels and
> slaves") changed the dma_request_chan() function flow in such a way that
> it always returns EPROBE_DEFER in case of channels that cannot be found.
> This break the operation of the devices which have optional DMA channels
> as it puts their drivers in endless deferred probe loop. Fix this by
> propagating the proper error value.

Fixed the title and Applied, thanks

-- 
~Vinod

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

* Re: [alsa-devel] [PATCH v2] dmaengine: Fix return value for dma_requrest_chan() in case of failure
@ 2020-01-30  8:25     ` Vinod Koul
  0 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2020-01-30  8:25 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: alsa-devel, linux-samsung-soc, Geert Uytterhoeven,
	Bartlomiej Zolnierkiewicz, linux-kernel, Krzysztof Kozlowski,
	Peter Ujfalusi, Mark Brown, dmaengine

On 30-01-20, 08:08, Marek Szyprowski wrote:
> Commit 71723a96b8b1 ("dmaengine: Create symlinks between DMA channels and
> slaves") changed the dma_request_chan() function flow in such a way that
> it always returns EPROBE_DEFER in case of channels that cannot be found.
> This break the operation of the devices which have optional DMA channels
> as it puts their drivers in endless deferred probe loop. Fix this by
> propagating the proper error value.

Fixed the title and Applied, thanks

-- 
~Vinod
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

end of thread, other threads:[~2020-01-30  8:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200130070850eucas1p1a7a09e2bec2f6fe652f206b61a8a04ae@eucas1p1.samsung.com>
2020-01-30  7:08 ` [PATCH v2] dmaengine: Fix return value for dma_requrest_chan() in case of failure Marek Szyprowski
2020-01-30  7:08   ` [alsa-devel] " Marek Szyprowski
2020-01-30  8:18   ` Geert Uytterhoeven
2020-01-30  8:18     ` [alsa-devel] " Geert Uytterhoeven
2020-01-30  8:25   ` Vinod Koul
2020-01-30  8:25     ` [alsa-devel] " Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.