diff mbox

[06/10] dmatest: use pseudo random numbers

Message ID 20131107021812.15120.11863.stgit@viggo.jf.intel.com (mailing list archive)
State Accepted
Commit be9fa5a43641103bf13cd1bb8101a1453da03616
Delegated to: Dan Williams
Headers show

Commit Message

Dan Williams Nov. 7, 2013, 2:18 a.m. UTC
There is no need for dmatest to drain the entropy pool.

It would be nice to one day have repeatable runs, but would need a
larger rework to synchronize and order calls to the rng across test
threads.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 drivers/dma/dmatest.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Andy Shevchenko Nov. 12, 2013, 11:58 a.m. UTC | #1
On Wed, 2013-11-06 at 18:18 -0800, Dan Williams wrote:
> There is no need for dmatest to drain the entropy pool.
> 
> It would be nice to one day have repeatable runs, but would need a
> larger rework to synchronize and order calls to the rng across test
> threads.

Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
>  drivers/dma/dmatest.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
> index ea829659149a..01ac7112b5fd 100644
> --- a/drivers/dma/dmatest.c
> +++ b/drivers/dma/dmatest.c
> @@ -176,7 +176,7 @@ static unsigned long dmatest_random(void)
>  {
>  	unsigned long buf;
>  
> -	get_random_bytes(&buf, sizeof(buf));
> +	prandom_bytes(&buf, sizeof(buf));
>  	return buf;
>  }
>  
>
diff mbox

Patch

diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index ea829659149a..01ac7112b5fd 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -176,7 +176,7 @@  static unsigned long dmatest_random(void)
 {
 	unsigned long buf;
 
-	get_random_bytes(&buf, sizeof(buf));
+	prandom_bytes(&buf, sizeof(buf));
 	return buf;
 }