> -----Original Message----- > From: Sinan Kaya [mailto:okaya@xxxxxxxxxxxxxx] > Sent: Tuesday, July 19, 2016 11:18 AM > To: Jiang, Dave <dave.jiang@xxxxxxxxx>; Koul, Vinod <vinod.koul@xxxxxxxxx>; lars@xxxxxxxxxx > Cc: dmaengine@xxxxxxxxxxxxxxx; Williams, Dan J <dan.j.williams@xxxxxxxxx>; laurent.pinchart@xxxxxxxxxxxxxxxx > Subject: Re: [PATCH v3 25/41] dmaengine: qcom_hidma: convert callback to helper function > > On 7/18/2016 5:50 PM, Dave Jiang wrote: > > list_for_each_entry_safe(mdesc, tmp, &list, node) { > > struct dma_async_tx_descriptor *txd = &mdesc->desc; > > - dma_async_tx_callback callback = mdesc->desc.callback; > > - void *param = mdesc->desc.callback_param; > > + struct dmaengine_desc_callback cb; > > > > + dmaengine_desc_get_callback(&mdesc->desc, &cb); > > dma_descriptor_unmap(txd); > > > > - if (callback) > > - callback(param); > > + dmaengine_desc_callback_invoke(&cb, NULL); > > This could have been done as > > + struct dmaengine_desc_callback cb; > + > + dmaengine_desc_get_callback_invoke(desc, &cb, NULL); > > too. Do you want the unmap before or after the callback? I think they all should be before, but I've seen quite a few drivers doing it after and I'm wondering if they are wrong.... > > -- > Sinan Kaya > Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. > Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. ��.n��������+%������w��{.n��������)�)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥