dmaengine Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] dmaengine: dmatest: Restore default for channel
@ 2020-04-29  7:15 Vladimir Murzin
  2020-05-13 11:30 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Murzin @ 2020-04-29  7:15 UTC (permalink / raw)
  To: dmaengine; +Cc: vkoul, seraj.alijan, vladimir.murzin

In case of dmatest is built-in and no channel was configured test
doesn't run with:

dmatest: Could not start test, no channels configured

Even though description to "channel" parameter claims that default is
any.

Add default channel back as it used to be rather than reject test with
no channel configuration.

Fixes: d53513d5dc285d9a95a534fc41c5c08af6b60eac ("dmaengine: dmatest: Add support for multi channel testing)

Reported-by: Dijil Mohan <Dijil.Mohan@arm.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
 drivers/dma/dmatest.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index a2cadfa..5e1fff9 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -1166,10 +1166,11 @@ static int dmatest_run_set(const char *val, const struct kernel_param *kp)
 		mutex_unlock(&info->lock);
 		return ret;
 	} else if (dmatest_run) {
-		if (is_threaded_test_pending(info))
-			start_threaded_tests(info);
-		else
-			pr_info("Could not start test, no channels configured\n");
+		if (!is_threaded_test_pending(info)){
+			pr_info("No channels configured, continue with any\n");
+			add_threaded_test(info);
+		}
+		start_threaded_tests(info);
 	} else {
 		stop_threaded_test(info);
 	}
-- 
2.7.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] dmaengine: dmatest: Restore default for channel
  2020-04-29  7:15 [PATCH] dmaengine: dmatest: Restore default for channel Vladimir Murzin
@ 2020-05-13 11:30 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2020-05-13 11:30 UTC (permalink / raw)
  To: Vladimir Murzin; +Cc: dmaengine, seraj.alijan

On 29-04-20, 08:15, Vladimir Murzin wrote:
> In case of dmatest is built-in and no channel was configured test
> doesn't run with:
> 
> dmatest: Could not start test, no channels configured
> 
> Even though description to "channel" parameter claims that default is
> any.
> 
> Add default channel back as it used to be rather than reject test with
> no channel configuration.
> 
> Fixes: d53513d5dc285d9a95a534fc41c5c08af6b60eac ("dmaengine: dmatest: Add support for multi channel testing)
> 

no need for blank line here

> Reported-by: Dijil Mohan <Dijil.Mohan@arm.com>
> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
> ---
>  drivers/dma/dmatest.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
> index a2cadfa..5e1fff9 100644
> --- a/drivers/dma/dmatest.c
> +++ b/drivers/dma/dmatest.c
> @@ -1166,10 +1166,11 @@ static int dmatest_run_set(const char *val, const struct kernel_param *kp)
>  		mutex_unlock(&info->lock);
>  		return ret;
>  	} else if (dmatest_run) {
> -		if (is_threaded_test_pending(info))
> -			start_threaded_tests(info);
> -		else
> -			pr_info("Could not start test, no channels configured\n");
> +		if (!is_threaded_test_pending(info)){

We need space before {

That is why we need to run checkpatch before sending patches.

I have fixed that up and applied this

-- 
~Vinod

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29  7:15 [PATCH] dmaengine: dmatest: Restore default for channel Vladimir Murzin
2020-05-13 11:30 ` Vinod Koul

dmaengine Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dmaengine/0 dmaengine/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dmaengine dmaengine/ https://lore.kernel.org/dmaengine \
		dmaengine@vger.kernel.org
	public-inbox-index dmaengine

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.dmaengine


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git