Coccinelle suggests replacing printk and WARN_ON with WARN
SUGGESTION: printk + WARN_ON can be just WARN.
Signed-off-by: Jules Irenge <[email protected]>
---
kernel/trace/trace_output.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index b4909082f6a4..c0efab8a40c4 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -764,8 +764,7 @@ int register_trace_event(struct trace_event *event)
list_add_tail(&event->list, list);
} else if (event->type > __TRACE_LAST_TYPE) {
- printk(KERN_WARNING "Need to add type to trace.h\n");
- WARN_ON(1);
+ WARN(1, "Need to add type to trace.h");
goto out;
} else {
/* Is this event already used */
--
2.25.1