diff mbox series

[v1,4/6] dmaengine: dmatest: Allow negative timeout value to specify infinite wait

Message ID 20200424161147.16895-4-andriy.shevchenko@linux.intel.com (mailing list archive)
State Accepted
Headers show
Series [v1,1/6] dmaengine: dmatest: Fix iteration non-stop logic | expand

Commit Message

Andy Shevchenko April 24, 2020, 4:11 p.m. UTC
The dmatest module parameter 'timeout' is documented as accepting a -1 to mean
"infinite timeout". However, an infinite timeout is not advised, nor possible
since the module parameter is an unsigned int, which won't accept a negative
value. Change the parameter type to be signed integer.

Cc: Gary Hook <Gary.Hook@amd.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/dma/dmatest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vinod Koul April 27, 2020, 4:18 p.m. UTC | #1
On 24-04-20, 19:11, Andy Shevchenko wrote:
> The dmatest module parameter 'timeout' is documented as accepting a -1 to mean
> "infinite timeout". However, an infinite timeout is not advised, nor possible
> since the module parameter is an unsigned int, which won't accept a negative
> value. Change the parameter type to be signed integer.

Applied, thanks
diff mbox series

Patch

diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index a521067751651..123b4bd41a085 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -60,7 +60,7 @@  MODULE_PARM_DESC(pq_sources,
 		"Number of p+q source buffers (default: 3)");
 
 static int timeout = 3000;
-module_param(timeout, uint, S_IRUGO | S_IWUSR);
+module_param(timeout, int, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(timeout, "Transfer Timeout in msec (default: 3000), "
 		 "Pass -1 for infinite timeout");