greybus: tracing: fix module num_interfaces
authorAlex Elder <elder@linaro.org>
Fri, 3 Jun 2016 20:55:33 +0000 (15:55 -0500)
committerGreg Kroah-Hartman <gregkh@google.com>
Sat, 4 Jun 2016 00:03:23 +0000 (17:03 -0700)
A module's num_interfaces field is included in the data to be
recorded for tracing, but it's never assigned or reported.  Fix
its type to be size_t, to match its definition in the gb_module
structure.

Also correct a format length modifier used for a host device's
num_cports field.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/greybus_trace.h

index cd930ea..9d38cb3 100644 (file)
@@ -250,18 +250,20 @@ DECLARE_EVENT_CLASS(gb_module,
        TP_STRUCT__entry(
                __field(int, hd_bus_id)
                __field(u8, module_id)
-               __field(u8, num_interfaces)
+               __field(size_t, num_interfaces)
                __field(int, disconnected)      /* bool */
        ),
 
        TP_fast_assign(
                __entry->hd_bus_id = module->hd->bus_id;
                __entry->module_id = module->module_id;
+               __entry->num_interfaces = module->num_interfaces;
                __entry->disconnected = module->disconnected;
        ),
 
-       TP_printk("greybus: hd_bus_id=%d module_id=%hhu disconnected=%d",
-               __entry->hd_bus_id, __entry->module_id, __entry->disconnected)
+       TP_printk("greybus: hd_bus_id=%d module_id=%hhu num_interfaces=%zu disconnected=%d",
+               __entry->hd_bus_id, __entry->module_id,
+               __entry->num_interfaces, __entry->disconnected)
 );
 
 #define DEFINE_MODULE_EVENT(name)                                      \