From: Alex Elder Date: Fri, 3 Jun 2016 20:55:39 +0000 (-0500) Subject: greybus: tracing: fix message traces X-Git-Tag: v4.14-rc1~2366^2~378^2~21^2~282 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0790c09a3bc987a22749b0fb9b3effa313b1ece7;p=platform%2Fkernel%2Flinux-rpi.git greybus: tracing: fix message traces The original message trace events were defined long before the recent tracing updates. It records information that's not really directly related to a message. Change the information recorded and reported for message events to just be the content of the message header. Signed-off-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/greybus_trace.h b/drivers/staging/greybus/greybus_trace.h index 62f5803..342f5ad 100644 --- a/drivers/staging/greybus/greybus_trace.h +++ b/drivers/staging/greybus/greybus_trace.h @@ -20,11 +20,6 @@ struct gb_connection; struct gb_bundle; struct gb_host_device; -#define gb_bundle_name(message) \ - (message->operation->connection->bundle ? \ - dev_name(&message->operation->connection->bundle->dev) : \ - dev_name(&message->operation->connection->hd->svc->dev)) - DECLARE_EVENT_CLASS(gb_message, TP_PROTO(struct gb_message *message), @@ -32,26 +27,23 @@ DECLARE_EVENT_CLASS(gb_message, TP_ARGS(message), TP_STRUCT__entry( - __string(name, gb_bundle_name(message)) - __field(u16, op_id) - __field(u16, intf_cport_id) - __field(u16, hd_cport_id) - __field(size_t, payload_size) + __field(u16, size) + __field(u16, operation_id) + __field(u8, type) + __field(u8, result) ), TP_fast_assign( - __assign_str(name, gb_bundle_name(message)) - __entry->op_id = message->operation->id; - __entry->intf_cport_id = - message->operation->connection->intf_cport_id; - __entry->hd_cport_id = - message->operation->connection->hd_cport_id; - __entry->payload_size = message->payload_size; + __entry->size = le16_to_cpu(message->header->size); + __entry->operation_id = + le16_to_cpu(message->header->operation_id); + __entry->type = message->header->type; + __entry->result = message->header->result; ), - TP_printk("greybus:%s op=%04x if_id=%u hd_id=%u l=%zu", - __get_str(name), __entry->op_id, __entry->intf_cport_id, - __entry->hd_cport_id, __entry->payload_size) + TP_printk("greybus: size=%hu operation_id=0x%04x type=0x%02x result=0x%02x", + __entry->size, __entry->operation_id, + __entry->type, __entry->result) ); #define DEFINE_MESSAGE_EVENT(name) \