diff mbox

dmaengine: dmatest: fix container_of member in dmatest_callback

Message ID 1516606108-40562-1-git-send-email-shunyong.yang@hxt-semitech.com (mailing list archive)
State Changes Requested
Headers show

Commit Message

Shunyong Yang Jan. 22, 2018, 7:28 a.m. UTC
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>
---
 drivers/dma/dmatest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Adam Wallis Jan. 23, 2018, 2:32 p.m. UTC | #1
On 1/22/2018 2:28 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>
> ---
>  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..906e85d6dedc 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(arg, struct dmatest_thread, test_done);
>  	if (!thread->done) {
>  		done->done = true;
>  		wake_up_all(done->wait);
> 
Thanks for the catch

Acked-by: Adam Wallis <awallis@codeaurora.org>
Shunyong Yang Jan. 24, 2018, 1:47 a.m. UTC | #2
Hi, Adam

On Tue, 2018-01-23 at 09:32 -0500, Adam Wallis wrote:
> On 1/22/2018 2:28 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>
> > ---
> >  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..906e85d6dedc 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(arg, struct dmatest_thread,
> > test_done);
> >  	if (!thread->done) {
> >  		done->done = true;
> >  		wake_up_all(done->wait);
> > 
> Thanks for the catch
> 
> Acked-by: Adam Wallis <awallis@codeaurora.org>

Thanks!

Shunyong--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Adam Wallis Jan. 24, 2018, 6:34 p.m. UTC | #3
Vinod,

On 1/23/2018 8:47 PM, Yang, Shunyong wrote:
> Hi, Adam
> 
> On Tue, 2018-01-23 at 09:32 -0500, Adam Wallis wrote:
>> On 1/22/2018 2:28 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>
[..]
>>>
>> Thanks for the catch
>>
>> Acked-by: Adam Wallis <awallis@codeaurora.org>
> 
> Thanks!
> 
> Shunyong
> 

Can we get this fix into the 4.16 kernel? This is an important fix.

Thanks

Adam
Wen He Feb. 11, 2018, 9:28 a.m. UTC | #4
DQpUaGFua3MgZm9yIHlvdSwgU2h1bnlvbmcuDQ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QlM0QmcmVzZXJ2ZWQ9MA0K
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Shunyong Yang Feb. 13, 2018, 5:54 a.m. UTC | #5
SGksIFdlbg0KDQpZb3UncmUgd2VsY29tZS4gVGhhdCdzIHdoeSBjYWxsIHRoaXMgQ09NTVVOSVRZ
IcKgOi0pDQoNClNodW55b25nLg0KVGhhbmtzLg0KDQpPbiBTdW4sIDIwMTgtMDItMTEgYXQgMDk6
MjggKzAwMDAsIFdlbiBIZSB3cm90ZToNCj4gVGhhbmtzIGZvciB5b3UsIFNodW55b25nLg0KPiAN
Cj4gQmVzdCBSZWdhcmRzLA0KPiBXZW4gSGUNCj4gDQo+ID4gDQo+ID4gLS0tLS1PcmlnaW5hbCBN
ZXNzYWdlLS0tLS0NCj4gPiBGcm9tOiBkbWFlbmdpbmUtb3duZXJAdmdlci5rZXJuZWwub3JnDQo+
ID4gW21haWx0bzpkbWFlbmdpbmUtb3duZXJAdmdlci5rZXJuZWwub3JnXSBPbiBCZWhhbGYgT2Yg
QWRhbSBXYWxsaXMNCj4gPiBTZW50OiAyMDE45bm0MeaciDIz5pelIDIyOjMyDQo+ID4gVG86IFlh
bmcgU2h1bnlvbmcgPHNodW55b25nLnlhbmdAaHh0LXNlbWl0ZWNoLmNvbT47DQo+ID4gdmlub2Qu
a291bEBpbnRlbC5jb20NCj4gPiBDYzogZGFuLmoud2lsbGlhbXNAaW50ZWwuY29tOyB5dS56aGVu
Z0BoeHQtc2VtaXRlY2guY29tOw0KPiA+IGRtYWVuZ2luZUB2Z2VyLmtlcm5lbC5vcmc7IGxpbnV4
LWtlcm5lbEB2Z2VyLmtlcm5lbC5vcmc7IEdyYWhhbQ0KPiA+IE1vb3JlDQo+ID4gPGdyYWhhbS5t
b29yZUBsaW51eC5pbnRlbC5jb20+OyBva2F5YUBjb2RlYXVyb3JhLm9yZyA+PiBTaW5hbiBL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z
dWJzY3JpYmUgZnJvbSB0aGlzIGxpc3Q6IHNlbmQgdGhlIGxpbmUgInVuc3Vic2NyaWJlDQo+ID4g
ZG1hZW5naW5lIiBpbiB0aGUNCj4gPiBib2R5IG9mIGEgbWVzc2FnZSB0byBtYWpvcmRvbW9Admdl
ci5rZXJuZWwub3JnIE1vcmUgbWFqb3Jkb21vIGluZm8NCj4gPiBhdA0KPiA+IGh0dHBzOi8vZW1l
YTAxLnNhZmVsaW5rcy5wcm90ZWN0aW9uLm91dGxvb2suY29tLz91cmw9aHR0cCUzQSUyRiUyRnYN
Cj4gPiBnZXIuDQo+ID4ga2VybmVsLm9yZyUyRm1ham9yZG9tby1pbmZvLmh0bWwmZGF0YT0wMiU3
QzAxJTdDd2VuLmhlXzElNDBueHAuY28NCj4gPiBtJTdDODgxNjE1NjhhN2ZkNDM0OTE0OWIwOGQ1
NjI2ZTE2NjElN0M2ODZlYTFkM2JjMmI0YzZmYTkyY2Q5DQo+ID4gOWM1YzMwMTYzNSU3QzAlN0Mw
JTdDNjM2NTIzMTQ3MzU0MTk2NjIyJnNkYXRhPXR4SXRndkQzUCUyRnJRcQ0KPiA+IE1TbXBabFRZ
MXJBMXlVZVd4TUhUbEVMTzV2d3k4NCUzRCZyZXNlcnZlZD0w
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index ec5f9d2bc820..906e85d6dedc 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(arg, struct dmatest_thread, test_done);
 	if (!thread->done) {
 		done->done = true;
 		wake_up_all(done->wait);