Skip to contentSkip to conversation

ring-buffer-benchmark: Fix the wrong type

PATCH Applied Wang Long 2 participants 2 messages Jun 10, 2015

Subsystems (2)
lore
Share & tools
lore

Wang Long

author
#0 lore raw

PATCH 1/1 ring-buffer-benchmark: Fix the wrong type

The macro 'module_param' shows that the type of the variable disable_reader and write_iteration is unsigned integer. so, we change their type form int to unsigned int.

---
 kernel/trace/ring_buffer_benchmark.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/trace/ring_buffer_benchmark.c +2 -2
index 1b28df2..e1b4a81 100644
@@ -32,11 +32,11 @@ static struct task_struct *producer;
 static struct task_struct *consumer;
 static unsigned long read;
 
-static int disable_reader;
+static unsigned int disable_reader;
 module_param(disable_reader, uint, 0644);
 MODULE_PARM_DESC(disable_reader, "only run producer");
 
-static int write_iteration = 50;
+static unsigned int write_iteration = 50;
 module_param(write_iteration, uint, 0644);
 MODULE_PARM_DESC(write_iteration, "# of writes between timestamp readings");
 
Signature · 1 line
1.8.3.4
maintainer Applied
#1 lore raw
Quoted 5 lines · On Wed, 10 Jun 2015 08:12:07 +0000 Wang Long <[email protected]> wrote:

The macro 'module_param' shows that the type of the variable disable_reader and write_iteration is unsigned integer. so, we change their type form int to unsigned int.

Thanks, applied!

-- Steve