Commit 3448bac3 authored by Fabian Frederick's avatar Fabian Frederick Committed by Steven Rostedt

tracing: Convert pr_warning() to pr_warn() in trace_events.c

Convert pr_warning to standard pr_warn
Define pr_fmt(fmt) fmt to avoid any future default fmt definition

Link: http://lkml.kernel.org/p/1402141388-21144-1-git-send-email-fabf@skynet.beSigned-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent ef2fbe16
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
* *
*/ */
#define pr_fmt(fmt) fmt
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/kthread.h> #include <linux/kthread.h>
...@@ -1490,7 +1492,7 @@ event_subsystem_dir(struct trace_array *tr, const char *name, ...@@ -1490,7 +1492,7 @@ event_subsystem_dir(struct trace_array *tr, const char *name,
dir->entry = debugfs_create_dir(name, parent); dir->entry = debugfs_create_dir(name, parent);
if (!dir->entry) { if (!dir->entry) {
pr_warning("Failed to create system directory %s\n", name); pr_warn("Failed to create system directory %s\n", name);
__put_system(system); __put_system(system);
goto out_free; goto out_free;
} }
...@@ -1506,7 +1508,7 @@ event_subsystem_dir(struct trace_array *tr, const char *name, ...@@ -1506,7 +1508,7 @@ event_subsystem_dir(struct trace_array *tr, const char *name,
if (!entry) { if (!entry) {
kfree(system->filter); kfree(system->filter);
system->filter = NULL; system->filter = NULL;
pr_warning("Could not create debugfs '%s/filter' entry\n", name); pr_warn("Could not create debugfs '%s/filter' entry\n", name);
} }
trace_create_file("enable", 0644, dir->entry, dir, trace_create_file("enable", 0644, dir->entry, dir,
...@@ -1521,8 +1523,7 @@ event_subsystem_dir(struct trace_array *tr, const char *name, ...@@ -1521,8 +1523,7 @@ event_subsystem_dir(struct trace_array *tr, const char *name,
out_fail: out_fail:
/* Only print this message if failed on memory allocation */ /* Only print this message if failed on memory allocation */
if (!dir || !system) if (!dir || !system)
pr_warning("No memory to create event subsystem %s\n", pr_warn("No memory to create event subsystem %s\n", name);
name);
return NULL; return NULL;
} }
...@@ -1550,8 +1551,7 @@ event_create_dir(struct dentry *parent, struct ftrace_event_file *file) ...@@ -1550,8 +1551,7 @@ event_create_dir(struct dentry *parent, struct ftrace_event_file *file)
name = ftrace_event_name(call); name = ftrace_event_name(call);
file->dir = debugfs_create_dir(name, d_events); file->dir = debugfs_create_dir(name, d_events);
if (!file->dir) { if (!file->dir) {
pr_warning("Could not create debugfs '%s' directory\n", pr_warn("Could not create debugfs '%s' directory\n", name);
name);
return -1; return -1;
} }
...@@ -1574,8 +1574,8 @@ event_create_dir(struct dentry *parent, struct ftrace_event_file *file) ...@@ -1574,8 +1574,8 @@ event_create_dir(struct dentry *parent, struct ftrace_event_file *file)
if (list_empty(head)) { if (list_empty(head)) {
ret = call->class->define_fields(call); ret = call->class->define_fields(call);
if (ret < 0) { if (ret < 0) {
pr_warning("Could not initialize trace point" pr_warn("Could not initialize trace point events/%s\n",
" events/%s\n", name); name);
return -1; return -1;
} }
} }
...@@ -1648,8 +1648,7 @@ static int event_init(struct ftrace_event_call *call) ...@@ -1648,8 +1648,7 @@ static int event_init(struct ftrace_event_call *call)
if (call->class->raw_init) { if (call->class->raw_init) {
ret = call->class->raw_init(call); ret = call->class->raw_init(call);
if (ret < 0 && ret != -ENOSYS) if (ret < 0 && ret != -ENOSYS)
pr_warn("Could not initialize trace events/%s\n", pr_warn("Could not initialize trace events/%s\n", name);
name);
} }
return ret; return ret;
...@@ -1894,7 +1893,7 @@ __trace_add_event_dirs(struct trace_array *tr) ...@@ -1894,7 +1893,7 @@ __trace_add_event_dirs(struct trace_array *tr)
list_for_each_entry(call, &ftrace_events, list) { list_for_each_entry(call, &ftrace_events, list) {
ret = __trace_add_new_event(call, tr); ret = __trace_add_new_event(call, tr);
if (ret < 0) if (ret < 0)
pr_warning("Could not create directory for event %s\n", pr_warn("Could not create directory for event %s\n",
ftrace_event_name(call)); ftrace_event_name(call));
} }
} }
...@@ -2207,7 +2206,7 @@ __trace_early_add_event_dirs(struct trace_array *tr) ...@@ -2207,7 +2206,7 @@ __trace_early_add_event_dirs(struct trace_array *tr)
list_for_each_entry(file, &tr->events, list) { list_for_each_entry(file, &tr->events, list) {
ret = event_create_dir(tr->event_dir, file); ret = event_create_dir(tr->event_dir, file);
if (ret < 0) if (ret < 0)
pr_warning("Could not create directory for event %s\n", pr_warn("Could not create directory for event %s\n",
ftrace_event_name(file->event_call)); ftrace_event_name(file->event_call));
} }
} }
...@@ -2231,7 +2230,7 @@ __trace_early_add_events(struct trace_array *tr) ...@@ -2231,7 +2230,7 @@ __trace_early_add_events(struct trace_array *tr)
ret = __trace_early_add_new_event(call, tr); ret = __trace_early_add_new_event(call, tr);
if (ret < 0) if (ret < 0)
pr_warning("Could not create early event %s\n", pr_warn("Could not create early event %s\n",
ftrace_event_name(call)); ftrace_event_name(call));
} }
} }
...@@ -2279,13 +2278,13 @@ create_event_toplevel_files(struct dentry *parent, struct trace_array *tr) ...@@ -2279,13 +2278,13 @@ create_event_toplevel_files(struct dentry *parent, struct trace_array *tr)
entry = debugfs_create_file("set_event", 0644, parent, entry = debugfs_create_file("set_event", 0644, parent,
tr, &ftrace_set_event_fops); tr, &ftrace_set_event_fops);
if (!entry) { if (!entry) {
pr_warning("Could not create debugfs 'set_event' entry\n"); pr_warn("Could not create debugfs 'set_event' entry\n");
return -ENOMEM; return -ENOMEM;
} }
d_events = debugfs_create_dir("events", parent); d_events = debugfs_create_dir("events", parent);
if (!d_events) { if (!d_events) {
pr_warning("Could not create debugfs 'events' directory\n"); pr_warn("Could not create debugfs 'events' directory\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -2461,11 +2460,10 @@ static __init int event_trace_init(void) ...@@ -2461,11 +2460,10 @@ static __init int event_trace_init(void)
entry = debugfs_create_file("available_events", 0444, d_tracer, entry = debugfs_create_file("available_events", 0444, d_tracer,
tr, &ftrace_avail_fops); tr, &ftrace_avail_fops);
if (!entry) if (!entry)
pr_warning("Could not create debugfs " pr_warn("Could not create debugfs 'available_events' entry\n");
"'available_events' entry\n");
if (trace_define_common_fields()) if (trace_define_common_fields())
pr_warning("tracing: Failed to allocate common fields"); pr_warn("tracing: Failed to allocate common fields");
ret = early_event_add_tracer(d_tracer, tr); ret = early_event_add_tracer(d_tracer, tr);
if (ret) if (ret)
...@@ -2474,7 +2472,7 @@ static __init int event_trace_init(void) ...@@ -2474,7 +2472,7 @@ static __init int event_trace_init(void)
#ifdef CONFIG_MODULES #ifdef CONFIG_MODULES
ret = register_module_notifier(&trace_module_nb); ret = register_module_notifier(&trace_module_nb);
if (ret) if (ret)
pr_warning("Failed to register trace events module notifier\n"); pr_warn("Failed to register trace events module notifier\n");
#endif #endif
return 0; return 0;
} }
...@@ -2578,7 +2576,7 @@ static __init void event_trace_self_tests(void) ...@@ -2578,7 +2576,7 @@ static __init void event_trace_self_tests(void)
* it and the self test should not be on. * it and the self test should not be on.
*/ */
if (file->flags & FTRACE_EVENT_FL_ENABLED) { if (file->flags & FTRACE_EVENT_FL_ENABLED) {
pr_warning("Enabled event during self test!\n"); pr_warn("Enabled event during self test!\n");
WARN_ON_ONCE(1); WARN_ON_ONCE(1);
continue; continue;
} }
...@@ -2606,7 +2604,7 @@ static __init void event_trace_self_tests(void) ...@@ -2606,7 +2604,7 @@ static __init void event_trace_self_tests(void)
ret = __ftrace_set_clr_event(tr, NULL, system->name, NULL, 1); ret = __ftrace_set_clr_event(tr, NULL, system->name, NULL, 1);
if (WARN_ON_ONCE(ret)) { if (WARN_ON_ONCE(ret)) {
pr_warning("error enabling system %s\n", pr_warn("error enabling system %s\n",
system->name); system->name);
continue; continue;
} }
...@@ -2615,7 +2613,7 @@ static __init void event_trace_self_tests(void) ...@@ -2615,7 +2613,7 @@ static __init void event_trace_self_tests(void)
ret = __ftrace_set_clr_event(tr, NULL, system->name, NULL, 0); ret = __ftrace_set_clr_event(tr, NULL, system->name, NULL, 0);
if (WARN_ON_ONCE(ret)) { if (WARN_ON_ONCE(ret)) {
pr_warning("error disabling system %s\n", pr_warn("error disabling system %s\n",
system->name); system->name);
continue; continue;
} }
...@@ -2630,7 +2628,7 @@ static __init void event_trace_self_tests(void) ...@@ -2630,7 +2628,7 @@ static __init void event_trace_self_tests(void)
ret = __ftrace_set_clr_event(tr, NULL, NULL, NULL, 1); ret = __ftrace_set_clr_event(tr, NULL, NULL, NULL, 1);
if (WARN_ON_ONCE(ret)) { if (WARN_ON_ONCE(ret)) {
pr_warning("error enabling all events\n"); pr_warn("error enabling all events\n");
return; return;
} }
...@@ -2639,7 +2637,7 @@ static __init void event_trace_self_tests(void) ...@@ -2639,7 +2637,7 @@ static __init void event_trace_self_tests(void)
/* reset sysname */ /* reset sysname */
ret = __ftrace_set_clr_event(tr, NULL, NULL, NULL, 0); ret = __ftrace_set_clr_event(tr, NULL, NULL, NULL, 0);
if (WARN_ON_ONCE(ret)) { if (WARN_ON_ONCE(ret)) {
pr_warning("error disabling all events\n"); pr_warn("error disabling all events\n");
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment