diff options
author | Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> | 2023-08-05 23:11:43 +0530 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2023-08-18 16:34:30 +0200 |
commit | bb7a103d4594bbec8fc74d10da2dd227e21cae35 (patch) | |
tree | f0b15fe2df3053aa74d97f09c0435eaea3510010 /Documentation/PCI | |
parent | cf82436dd831a87c87f3d625a527a9ee35ae6f4d (diff) | |
download | linux-bb7a103d4594bbec8fc74d10da2dd227e21cae35.tar.gz linux-bb7a103d4594bbec8fc74d10da2dd227e21cae35.tar.bz2 linux-bb7a103d4594bbec8fc74d10da2dd227e21cae35.zip |
mtd: rawnand: qcom: Unmap sg_list and free desc within submic_descs()
There are two types of dma descriptors being used in this driver allocated
by, prepare_bam_async_desc() and prep_adm_dma_desc() helper functions.
These functions map and prepare the descriptors to be used for dma
transfers.
And all the descriptors are submitted inside the submit_descs() function.
Once the transfer completion happens, those descriptors should be unmapped
and freed as a part of cleanup.
Currently, free_descs() function is doing the said cleanup of descriptors.
But the callers of submit_descs() are required to call free_descs() in both
the success and error cases.
Since there are no other transactions need to be done after submit_descs(),
let's just move the contents of free_descs() inside submit_descs() itself.
This makes sure that the cleanup is handled within the submit_descs()
thereby offloading the cleanup part from callers.
While at it, let's also rename the return variable from "r" to "ret".
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230805174146.57006-8-manivannan.sadhasivam@linaro.org
Diffstat (limited to 'Documentation/PCI')
0 files changed, 0 insertions, 0 deletions