lkml.org 
[lkml]   [2019]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] printk-rb: fix test module macro usage
Date
DECLARE_PRINTKRB() now requires a wait queue argument, used
by the blocking reader interface.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
---
For RFCv4 the macro prototype changed. The fixup for the
test module didn't make it into the series.

kernel/printk/test_prb.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/kernel/printk/test_prb.c b/kernel/printk/test_prb.c
index 0157bbdf051f..49bcf831af7e 100644
--- a/kernel/printk/test_prb.c
+++ b/kernel/printk/test_prb.c
@@ -6,8 +6,11 @@
#include <linux/delay.h>
#include <linux/random.h>
#include <linux/slab.h>
+#include <linux/wait.h>
#include "ringbuffer.h"

+DECLARE_WAIT_QUEUE_HEAD(test_wait);
+
/*
* This is a test module that starts "num_online_cpus() - 1" writer threads
* and 1 reader thread. The writer threads each write strings of varying
@@ -63,7 +66,7 @@ static void dump_rb(struct printk_ringbuffer *rb)
trace_printk("END full dump\n");
}

-DECLARE_PRINTKRB(test_rb, 5, 7);
+DECLARE_PRINTKRB(test_rb, 5, 7, &test_wait);

static int prbtest_writer(void *data)
{
--
2.20.1
\
 
 \ /
  Last update: 2019-08-19 23:30    [W:0.505 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site