diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2016-07-26 17:11:29 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-07-26 14:53:19 -0700 |
commit | 112f563e1879ab73853fed9d875f45d96d5990fd (patch) | |
tree | 562d9e0674d7b9e8f2d603520252d727578bf483 /drivers/staging/greybus/operation.c | |
parent | dfcba8626f55fe5d6ba6e2847178cbf629740773 (diff) | |
download | op-kernel-dev-112f563e1879ab73853fed9d875f45d96d5990fd.zip op-kernel-dev-112f563e1879ab73853fed9d875f45d96d5990fd.tar.gz |
greybus: operation: fix broken response tracepoint
The response-received tracepoint is currently broken. Instead of parsing
the received message header it was tracing a bunch of zeroed fields from
an uninitialised response buffer.
Fix this by moving the tracepoint after were the response buffer is
initialised.
Fixes: 7cb496e6890e ("greybus: tracing: fix message traces")
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/operation.c')
-rw-r--r-- | drivers/staging/greybus/operation.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c index e26b1e1..b9692b7 100644 --- a/drivers/staging/greybus/operation.c +++ b/drivers/staging/greybus/operation.c @@ -974,7 +974,6 @@ static void gb_connection_recv_response(struct gb_connection *connection, errno = -EMSGSIZE; } } - trace_gb_message_recv_response(operation->response); /* We must ignore the payload if a bad status is returned */ if (errno) @@ -983,6 +982,9 @@ static void gb_connection_recv_response(struct gb_connection *connection, /* The rest will be handled in work queue context */ if (gb_operation_result_set(operation, errno)) { memcpy(message->buffer, data, size); + + trace_gb_message_recv_response(message); + queue_work(gb_operation_completion_wq, &operation->work); } |