Messages in this thread Patch in this message | | | From | Jules Irenge <> | Subject | [PATCH 08/10] trace: Replace printk and WARN_ON with WARN | Date | Fri, 27 Mar 2020 21:23:55 +0000 |
| |
Coccinelle suggests replacing printk and WARN_ON with WARN
SUGGESTION: printk + WARN_ON can be just WARN. Signed-off-by: Jules Irenge <jbi.octave@gmail.com> --- 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
| |