Re: [PATCH] tracing/syscalls: add in missing white space in error message text

From: Joe Perches
Date: Mon Sep 12 2016 - 13:34:37 EST


On Mon, 2016-09-12 at 12:41 +0100, Colin King wrote:

> 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

> diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
[]
> @@ -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);