public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Kaiwei Liu <kaiwei.liu@unisoc.com>
Cc: Orson Zhai <orsonzhai@gmail.com>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	Chunyan Zhang <zhang.lyra@gmail.com>,
	dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	kaiwei liu <liukaiwei086@gmail.com>,
	Wenming Wu <wenming.wu@unisoc.com>
Subject: Re: [PATCH 1/2] dmaengine: sprd: delete enable opreation in probe
Date: Fri, 24 Nov 2023 18:41:18 +0530	[thread overview]
Message-ID: <ZWCg9hmfvexyn7xK@matsya> (raw)
In-Reply-To: <20231102121623.31924-1-kaiwei.liu@unisoc.com>

On 02-11-23, 20:16, Kaiwei Liu wrote:
> From: "kaiwei.liu" <kaiwei.liu@unisoc.com>

Typo is subject line

> 
> In the probe of dma, it will allocate device memory and do some
> initalization settings. All operations are only at the software
> level and don't need the DMA hardware power on. It doesn't need
> to resume the device and set the device active as well. here
> delete unnecessary operation.

Don't you need to read or write to the device? Without enable that wont
work right?

Lastly patches appear disjoint, pls thread them properly

> 
> Signed-off-by: kaiwei.liu <kaiwei.liu@unisoc.com>
> ---
>  drivers/dma/sprd-dma.c | 19 ++-----------------
>  1 file changed, 2 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
> index 08fcf1ec368c..8ab5a9082fc5 100644
> --- a/drivers/dma/sprd-dma.c
> +++ b/drivers/dma/sprd-dma.c
> @@ -1203,21 +1203,11 @@ static int sprd_dma_probe(struct platform_device *pdev)
>  	}
>  
>  	platform_set_drvdata(pdev, sdev);
> -	ret = sprd_dma_enable(sdev);
> -	if (ret)
> -		return ret;
> -
> -	pm_runtime_set_active(&pdev->dev);
> -	pm_runtime_enable(&pdev->dev);
> -
> -	ret = pm_runtime_get_sync(&pdev->dev);
> -	if (ret < 0)
> -		goto err_rpm;
>  
>  	ret = dma_async_device_register(&sdev->dma_dev);
>  	if (ret < 0) {
>  		dev_err(&pdev->dev, "register dma device failed:%d\n", ret);
> -		goto err_register;
> +		return ret;
>  	}
>  
>  	sprd_dma_info.dma_cap = sdev->dma_dev.cap_mask;
> @@ -1226,16 +1216,11 @@ static int sprd_dma_probe(struct platform_device *pdev)
>  	if (ret)
>  		goto err_of_register;
>  
> -	pm_runtime_put(&pdev->dev);
> +	pm_runtime_enable(&pdev->dev);
>  	return 0;
>  
>  err_of_register:
>  	dma_async_device_unregister(&sdev->dma_dev);
> -err_register:
> -	pm_runtime_put_noidle(&pdev->dev);
> -	pm_runtime_disable(&pdev->dev);
> -err_rpm:
> -	sprd_dma_disable(sdev);
>  	return ret;
>  }
>  
> -- 
> 2.17.1

-- 
~Vinod

  reply	other threads:[~2023-11-24 13:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 12:16 [PATCH 1/2] dmaengine: sprd: delete enable opreation in probe Kaiwei Liu
2023-11-24 13:11 ` Vinod Koul [this message]
2023-12-06  9:32   ` liu kaiwei
2023-12-11 11:40     ` Vinod Koul
2023-12-19  5:21       ` liu kaiwei
2023-12-19  7:00         ` Baolin Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZWCg9hmfvexyn7xK@matsya \
    --to=vkoul@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=kaiwei.liu@unisoc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liukaiwei086@gmail.com \
    --cc=orsonzhai@gmail.com \
    --cc=wenming.wu@unisoc.com \
    --cc=zhang.lyra@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox