Skip to contentSkip to conversation

tracing/syscalls: add in missing white space in error message text

PATCH In review Colin King 4 participants 4 messages Sep 12, 2016 – Sep 13, 2016 Tracing

lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 tracing/syscalls: add in missing white space in error message text

From: Colin Ian King <[email protected]>

pr_info message spans two lines and the literal string is missing a white space between words. Add the white space.

---
 kernel/trace/trace_syscalls.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/trace/trace_syscalls.c +2 -2
index b2b6efc..79d8752 100644
@@ -610,7 +610,7 @@ static int perf_sysenter_enable(struct trace_event_call *call)
 	if (!sys_perf_refcount_enter)
 		ret = register_trace_sys_enter(perf_syscall_enter, NULL);
 	if (ret) {
-		pr_info("event trace: Could not activate"
+		pr_info("event trace: Could not activate "
 				"syscall entry trace point");
 	} else {
 		set_bit(num, enabled_perf_enter_syscalls);
@@ -682,7 +682,7 @@ static int perf_sysexit_enable(struct trace_event_call *call)
 	if (!sys_perf_refcount_exit)
 		ret = register_trace_sys_exit(perf_syscall_exit, NULL);
 	if (ret) {
-		pr_info("event trace: Could not activate"
+		pr_info("event trace: Could not activate "
 				"syscall exit trace point");
 	} else {
 		set_bit(num, enabled_perf_exit_syscalls);
Signature · 1 line
2.9.3
maintainer
#1 lore raw
Quoted 15 lines · On Mon, 12 Sep 2016 12:41:27 +0100 Colin King <[email protected]> wrote:

From: Colin Ian King <[email protected]>

pr_info message spans two lines and the literal string is missing a white space between words. Add the white space.

---
 kernel/trace/trace_syscalls.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/trace/trace_syscalls.c +0 -0
index b2b6efc..79d8752 100644

kernel/trace/trace_syscalls.c static int perf_sysenter_enable(struct trace_event_call *call) · line 614

Quoted 6 lines
kernel/trace/trace_syscalls.c +1 -1
@@ -610,7 +610,7 @@ static int perf_sysenter_enable(struct trace_event_call *call)
 	if (!sys_perf_refcount_enter)
 		ret = register_trace_sys_enter(perf_syscall_enter, NULL);
 	if (ret) {
-		pr_info("event trace: Could not activate"
+		pr_info("event trace: Could not activate "
 				"syscall entry trace point");

Actually, the better fix is to make this one line. The 80 character limit is not applicable when it cuts strings in half, especially when it causes bugs like this.

Also, this should go through trivial (with an ack from us).

-- Steve

Quoted 11 lines
kernel/trace/trace_syscalls.c +1 -1
 	} else {
 		set_bit(num, enabled_perf_enter_syscalls);
@@ -682,7 +682,7 @@ static int perf_sysexit_enable(struct trace_event_call *call)
 	if (!sys_perf_refcount_exit)
 		ret = register_trace_sys_exit(perf_syscall_exit, NULL);
 	if (ret) {
-		pr_info("event trace: Could not activate"
+		pr_info("event trace: Could not activate "
 				"syscall exit trace point");
 	} else {
 		set_bit(num, enabled_perf_exit_syscalls);
Acked-by
#2 lore raw
Quoted 29 lines · Steven Rostedt
Quoted 15 lines · On Mon, 12 Sep 2016 12:41:27 +0100 Colin King <[email protected]> wrote:

From: Colin Ian King <[email protected]>

pr_info message spans two lines and the literal string is missing a white space between words. Add the white space.

---
 kernel/trace/trace_syscalls.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/trace/trace_syscalls.c +0 -0
index b2b6efc..79d8752 100644

kernel/trace/trace_syscalls.c static int perf_sysenter_enable(struct trace_event_call *call) · line 614

Quoted 6 lines
kernel/trace/trace_syscalls.c +1 -1
@@ -610,7 +610,7 @@ static int perf_sysenter_enable(struct trace_event_call *call)
 	if (!sys_perf_refcount_enter)
 		ret = register_trace_sys_enter(perf_syscall_enter, NULL);
 	if (ret) {
-		pr_info("event trace: Could not activate"
+		pr_info("event trace: Could not activate "
 				"syscall entry trace point");

Actually, the better fix is to make this one line. The 80 character limit is not applicable when it cuts strings in half, especially when it causes bugs like this.

Quoted 1 line

Also, this should go through trivial (with an ack from us).

Agreed that user visible strings should be on a single line. With that change:

Thanks,

Ingo

#3 lore raw
In reply to Colin King
Quoted 2 lines · Colin King

pr_info message spans two lines and the literal string is missing a white space between words. Add the white space.

Perhaps better would be to coalesce the format string fragments.

And if you didn't already know, checkpatch can find potential defects like this using --types=split_string,missing_space

For instance:

$ ./scripts/checkpatch.pl --show-types --types=split_string,missing_space --terse --no-summary \
  -f kernel/trace/trace_syscalls.c  
kernel/trace/trace_syscalls.c:614: WARNING:SPLIT_STRING: quoted string split across lines
kernel/trace/trace_syscalls.c:614: WARNING:MISSING_SPACE: break quoted strings at a space character
kernel/trace/trace_syscalls.c:686: WARNING:SPLIT_STRING: quoted string split across lines
kernel/trace/trace_syscalls.c:686: WARNING:MISSING_SPACE: break quoted strings at a space character

kernel/trace/trace_syscalls.c

Quoted 1 line
kernel/trace/trace_syscalls.c +0 -0

[]

Quoted 18 lines
kernel/trace/trace_syscalls.c +2 -2
@@ -610,7 +610,7 @@ static int perf_sysenter_enable(struct trace_event_call *call)
 	if (!sys_perf_refcount_enter)
 		ret = register_trace_sys_enter(perf_syscall_enter, NULL);
 	if (ret) {
-		pr_info("event trace: Could not activate"
+		pr_info("event trace: Could not activate "
 				"syscall entry trace point");
 	} else {
 		set_bit(num, enabled_perf_enter_syscalls);
@@ -682,7 +682,7 @@ static int perf_sysexit_enable(struct trace_event_call *call)
 	if (!sys_perf_refcount_exit)
 		ret = register_trace_sys_exit(perf_syscall_exit, NULL);
 	if (ret) {
-		pr_info("event trace: Could not activate"
+		pr_info("event trace: Could not activate "
 				"syscall exit trace point");
 	} else {
 		set_bit(num, enabled_perf_exit_syscalls);