diff mbox series

[v7,11/19] dmaengine: tegra-apb: Remove pending_sg_req checking from tdc_start_head_req

Message ID 20200202222854.18409-12-digetx@gmail.com
State Changes Requested
Headers show
Series NVIDIA Tegra APB DMA driver fixes and improvements | expand

Commit Message

Dmitry Osipenko Feb. 2, 2020, 10:28 p.m. UTC
There are only two places in the driver that use tdc_start_head_req()
and both these places check whether pending_sg_req list is empty before
invoking tdc_start_head_req().

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/dma/tegra20-apb-dma.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Jon Hunter Feb. 4, 2020, 2:53 p.m. UTC | #1
On 02/02/2020 22:28, Dmitry Osipenko wrote:
> There are only two places in the driver that use tdc_start_head_req()
> and both these places check whether pending_sg_req list is empty before
> invoking tdc_start_head_req().
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  drivers/dma/tegra20-apb-dma.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
> index 22b88ccff05d..62d181bd5e62 100644
> --- a/drivers/dma/tegra20-apb-dma.c
> +++ b/drivers/dma/tegra20-apb-dma.c
> @@ -504,9 +504,6 @@ static void tdc_start_head_req(struct tegra_dma_channel *tdc)
>  {
>  	struct tegra_dma_sg_req *sg_req;
>  
> -	if (list_empty(&tdc->pending_sg_req))
> -		return;
> -
>  	sg_req = list_first_entry(&tdc->pending_sg_req, typeof(*sg_req), node);
>  	tegra_dma_start(tdc, sg_req);
>  	sg_req->configured = true;
> 

Acked-by: Jon Hunter <jonathanh@nvidia.com>

Cheers
Jon
diff mbox series

Patch

diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index 22b88ccff05d..62d181bd5e62 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -504,9 +504,6 @@  static void tdc_start_head_req(struct tegra_dma_channel *tdc)
 {
 	struct tegra_dma_sg_req *sg_req;
 
-	if (list_empty(&tdc->pending_sg_req))
-		return;
-
 	sg_req = list_first_entry(&tdc->pending_sg_req, typeof(*sg_req), node);
 	tegra_dma_start(tdc, sg_req);
 	sg_req->configured = true;