[PATCH] printk-rb: fix test module macro usage

From: John Ogness
Date: Mon Aug 19 2019 - 17:30:16 EST


DECLARE_PRINTKRB() now requires a wait queue argument, used
by the blocking reader interface.

Signed-off-by: John Ogness <john.ogness@xxxxxxxxxxxxx>
---
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