rv: Let the reactors take care of buffers
Each RV monitor has one static buffer to send to the reactors. If multiple errors are detected simultaneously, the one buffer could be overwritten. Instead, leave it to the reactors to handle buffering. Reviewed-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Nam Cao <namcao@linutronix.de> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
This commit is contained in:
committed by
Steven Rostedt (Google)
parent
3f045de7f5
commit
ff4e233d8a
@@ -13,9 +13,13 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/rv.h>
|
||||
|
||||
static void rv_panic_reaction(char *msg)
|
||||
__printf(1, 2) static void rv_panic_reaction(const char *msg, ...)
|
||||
{
|
||||
panic(msg);
|
||||
va_list args;
|
||||
|
||||
va_start(args, msg);
|
||||
vpanic(msg, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
static struct rv_reactor rv_panic = {
|
||||
|
||||
@@ -12,9 +12,13 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/rv.h>
|
||||
|
||||
static void rv_printk_reaction(char *msg)
|
||||
__printf(1, 2) static void rv_printk_reaction(const char *msg, ...)
|
||||
{
|
||||
printk_deferred(msg);
|
||||
va_list args;
|
||||
|
||||
va_start(args, msg);
|
||||
vprintk_deferred(msg, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
static struct rv_reactor rv_printk = {
|
||||
|
||||
@@ -490,7 +490,7 @@ void reactor_cleanup_monitor(struct rv_monitor_def *mdef)
|
||||
/*
|
||||
* Nop reactor register
|
||||
*/
|
||||
static void rv_nop_reaction(char *msg)
|
||||
__printf(1, 2) static void rv_nop_reaction(const char *msg, ...)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user