dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [v2] dmaengine: dmatest: fix container_of member in dmatest_callback
@ 2018-01-29  6:40 Yang Shunyong
  0 siblings, 0 replies; 3+ messages in thread
From: Yang Shunyong @ 2018-01-29  6:40 UTC (permalink / raw)
  To: vinod.koul
  Cc: dan.j.williams, dmaengine, linux-kernel, yu.zheng, Yang Shunyong

The type of arg passed to dmatest_callback is struct dmatest_done.
It refers to test_done in struct dmatest_thread, not done_wait.

Fixes: 6f6a23a213be ("dmaengine: dmatest: move callback wait ...")
Signed-off-by: Yang Shunyong <shunyong.yang@hxt-semitech.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---

v2: change arg to done in container_of().

---
 drivers/dma/dmatest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index ec5f9d2bc820..80cc2be6483c 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -355,7 +355,7 @@ static void dmatest_callback(void *arg)
 {
 	struct dmatest_done *done = arg;
 	struct dmatest_thread *thread =
-		container_of(arg, struct dmatest_thread, done_wait);
+		container_of(done, struct dmatest_thread, test_done);
 	if (!thread->done) {
 		done->done = true;
 		wake_up_all(done->wait);

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

* [v2] dmaengine: dmatest: fix container_of member in dmatest_callback
@ 2018-01-29 13:17 Adam Wallis
  0 siblings, 0 replies; 3+ messages in thread
From: Adam Wallis @ 2018-01-29 13:17 UTC (permalink / raw)
  To: Yang Shunyong, vinod.koul
  Cc: dan.j.williams, dmaengine, linux-kernel, yu.zheng

Yang,

On 1/29/2018 1:40 AM, Yang Shunyong wrote:
> The type of arg passed to dmatest_callback is struct dmatest_done.
> It refers to test_done in struct dmatest_thread, not done_wait.
> 
> Fixes: 6f6a23a213be ("dmaengine: dmatest: move callback wait ...")
> Signed-off-by: Yang Shunyong <shunyong.yang@hxt-semitech.com>
> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> ---
> 
> v2: change arg to done in container_of().
> 
> ---
>  drivers/dma/dmatest.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
> index ec5f9d2bc820..80cc2be6483c 100644
> --- a/drivers/dma/dmatest.c
> +++ b/drivers/dma/dmatest.c
> @@ -355,7 +355,7 @@ static void dmatest_callback(void *arg)
>  {
>  	struct dmatest_done *done = arg;
>  	struct dmatest_thread *thread =
> -		container_of(arg, struct dmatest_thread, done_wait);
> +		container_of(done, struct dmatest_thread, test_done);
>  	if (!thread->done) {
>  		done->done = true;
>  		wake_up_all(done->wait);
> 

Thanks again for the fix (and to Vinod for the cleanup)

Acked-by: Adam Wallis <awallis@codeaurora.org>

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

* [v2] dmaengine: dmatest: fix container_of member in dmatest_callback
@ 2018-01-30  6:55 Vinod Koul
  0 siblings, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2018-01-30  6:55 UTC (permalink / raw)
  To: Yang Shunyong; +Cc: dan.j.williams, dmaengine, linux-kernel, yu.zheng

On Mon, Jan 29, 2018 at 02:40:11PM +0800, Yang Shunyong wrote:
> The type of arg passed to dmatest_callback is struct dmatest_done.
> It refers to test_done in struct dmatest_thread, not done_wait.

Applied, thanks

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

end of thread, other threads:[~2018-01-30  6:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-30  6:55 [v2] dmaengine: dmatest: fix container_of member in dmatest_callback Vinod Koul
  -- strict thread matches above, loose matches on Subject: below --
2018-01-29 13:17 Adam Wallis
2018-01-29  6:40 Yang Shunyong

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).