trace: fix trace_graph_ret_raw return type 47/155647/1
authorArnd Bergmann <arnd@arndb.de>
Tue, 9 May 2017 19:46:57 +0000 (21:46 +0200)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 16 Oct 2017 01:34:12 +0000 (10:34 +0900)
As found by kernelci, an extraneous semicolon causes incorrect
behavior in one of the tracing functions:

kernel/trace/trace_output.c: In function 'trace_graph_ret_raw':
kernel/trace/trace_output.c:976:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  if (!trace_seq_printf(&iter->seq, "%lx %lld %lld %ld %d\n",
  ^~
kernel/trace/trace_output.c:982:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
   return TRACE_TYPE_PARTIAL_LINE;

This removes the semicolon to make the function return success
correctly.

Link: https://kernelci.org/build/id/5910641d59b514cb17b12d4d/logs/
Fixes: 6f6f99a38132 ("trace: add non-hierarchical function_graph option")
Cc: Jamie Gennis <jgennis@google.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
[sw0312.kim: Cherry-pick from linux-android (https://android.googlesource.com/kernel/common) to fix build warning]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I1c8a2d4261e92060f12e23de3529510ac7333a01

kernel/trace/trace_output.c

index a68e5e3..d84ade1 100644 (file)
@@ -1159,7 +1159,7 @@ static enum print_line_t trace_graph_ret_raw(struct trace_iterator *iter, int fl
                              field->ret.calltime,
                              field->ret.rettime,
                              field->ret.overrun,
-                             field->ret.depth));
+                             field->ret.depth))
                return TRACE_TYPE_PARTIAL_LINE;
 
        return TRACE_TYPE_HANDLED;