Skip to contentSkip to conversation

trace_syscalls.c: Use pr_fmt and pr_<level>

PATCH New Joe Perches 1 participant 1 message Dec 13, 2009 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trace_syscalls.c: Use pr_fmt and pr_<level>

I can't tell if the pr_info formats should be newline terminated or not, so I left them as is.

Add #define pr_fmt(fmt) "event trace: " fmt Remove prefixes from pr_info
Coalesce pr_<level> format strings
Add spaces between "activate" and "syscalls" Fix pr_info entry/exit copy/paste typo

---

kernel/trace/trace_syscalls.c +6 -8
index 57501d9..35ca3e8 100644
@@ -1,3 +1,5 @@
+#define pr_fmt(fmt) "event trace: " fmt
+
 #include <trace/syscall.h>
 #include <trace/events/syscalls.h>
 #include <linux/kernel.h>
@@ -334,8 +336,7 @@ int reg_event_syscall_enter(struct ftrace_event_call *call)
 	if (!sys_refcount_enter)
 		ret = register_trace_sys_enter(ftrace_syscall_enter);
 	if (ret) {
-		pr_info("event trace: Could not activate"
-				"syscall entry trace point");
+		pr_info("Could not activate syscall entry trace point");
 	} else {
 		set_bit(num, enabled_enter_syscalls);
 		sys_refcount_enter++;
@@ -371,8 +372,7 @@ int reg_event_syscall_exit(struct ftrace_event_call *call)
 	if (!sys_refcount_exit)
 		ret = register_trace_sys_exit(ftrace_syscall_exit);
 	if (ret) {
-		pr_info("event trace: Could not activate"
-				"syscall exit trace point");
+		pr_info("Could not activate syscall exit trace point");
 	} else {
 		set_bit(num, enabled_exit_syscalls);
 		sys_refcount_exit++;
@@ -515,8 +515,7 @@ int prof_sysenter_enable(struct ftrace_event_call *call)
 	if (!sys_prof_refcount_enter)
 		ret = register_trace_sys_enter(prof_syscall_enter);
 	if (ret) {
-		pr_info("event trace: Could not activate"
-				"syscall entry trace point");
+		pr_info("Could not activate syscall entry trace point");
 	} else {
 		set_bit(num, enabled_prof_enter_syscalls);
 		sys_prof_refcount_enter++;
@@ -616,8 +615,7 @@ int prof_sysexit_enable(struct ftrace_event_call *call)
 	if (!sys_prof_refcount_exit)
 		ret = register_trace_sys_exit(prof_syscall_exit);
 	if (ret) {
-		pr_info("event trace: Could not activate"
-				"syscall entry trace point");
+		pr_info("Could not activate syscall exit trace point");
 	} else {
 		set_bit(num, enabled_prof_exit_syscalls);
 		sys_prof_refcount_exit++;