mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ring-buffer-benchmark: Fix the wrong param in module_param
@ 2015-06-10  8:11 Wang Long
  2015-06-10 19:44 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Long @ 2015-06-10  8:11 UTC (permalink / raw)
  To: rostedt, mingo; +Cc: wanglong, long.wanglong, linux-kernel, peifeiyue

The {producer|consumer}_{nice|fifo} parameters are integer
type, we should use 'int' as the second param in module_param.

For example(consumer_fifo):
	the default value of consumer_fifo is -1.
   Without this patch:
        # cat /sys/module/ring_buffer_benchmark/parameters/consumer_fifo
        4294967295
   With this patch:
	# cat /sys/module/ring_buffer_benchmark/parameters/consumer_fifo
	-1

Signed-off-by: Wang Long <long.wanglong@huawei.com>
---
 kernel/trace/ring_buffer_benchmark.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/trace/ring_buffer_benchmark.c b/kernel/trace/ring_buffer_benchmark.c
index e1b4a81..61b933b 100644
--- a/kernel/trace/ring_buffer_benchmark.c
+++ b/kernel/trace/ring_buffer_benchmark.c
@@ -46,16 +46,16 @@ static int consumer_nice = MAX_NICE;
 static int producer_fifo = -1;
 static int consumer_fifo = -1;
 
-module_param(producer_nice, uint, 0644);
+module_param(producer_nice, int, 0644);
 MODULE_PARM_DESC(producer_nice, "nice prio for producer");
 
-module_param(consumer_nice, uint, 0644);
+module_param(consumer_nice, int, 0644);
 MODULE_PARM_DESC(consumer_nice, "nice prio for consumer");
 
-module_param(producer_fifo, uint, 0644);
+module_param(producer_fifo, int, 0644);
 MODULE_PARM_DESC(producer_fifo, "fifo prio for producer");
 
-module_param(consumer_fifo, uint, 0644);
+module_param(consumer_fifo, int, 0644);
 MODULE_PARM_DESC(consumer_fifo, "fifo prio for consumer");
 
 static int read_events;
-- 
1.8.3.4


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

end of thread, other threads:[~2015-06-10 19:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-10  8:11 [PATCH] ring-buffer-benchmark: Fix the wrong param in module_param Wang Long
2015-06-10 19:44 ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®