From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751938AbeA2NRg (ORCPT ); Mon, 29 Jan 2018 08:17:36 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:34456 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751740AbeA2NRe (ORCPT ); Mon, 29 Jan 2018 08:17:34 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C945E60112 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=awallis@codeaurora.org Subject: Re: [PATCH v2] dmaengine: dmatest: fix container_of member in dmatest_callback To: Yang Shunyong , vinod.koul@intel.com Cc: dan.j.williams@intel.com, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, yu.zheng@hxt-semitch.com References: <1517208011-7640-1-git-send-email-shunyong.yang@hxt-semitech.com> From: Adam Wallis Message-ID: <6ca31eff-f566-aefe-1364-b488f49117ed@codeaurora.org> Date: Mon, 29 Jan 2018 08:17:26 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <1517208011-7640-1-git-send-email-shunyong.yang@hxt-semitech.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Signed-off-by: Vinod Koul > --- > > 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 -- Adam Wallis Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.