greybus: tracing: fix module num_interfaces
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1ea3ed54dc
commit
c65fdf0318
@@ -250,18 +250,20 @@ DECLARE_EVENT_CLASS(gb_module,
|
|||||||
TP_STRUCT__entry(
|
TP_STRUCT__entry(
|
||||||
__field(int, hd_bus_id)
|
__field(int, hd_bus_id)
|
||||||
__field(u8, module_id)
|
__field(u8, module_id)
|
||||||
__field(u8, num_interfaces)
|
__field(size_t, num_interfaces)
|
||||||
__field(int, disconnected) /* bool */
|
__field(int, disconnected) /* bool */
|
||||||
),
|
),
|
||||||
|
|
||||||
TP_fast_assign(
|
TP_fast_assign(
|
||||||
__entry->hd_bus_id = module->hd->bus_id;
|
__entry->hd_bus_id = module->hd->bus_id;
|
||||||
__entry->module_id = module->module_id;
|
__entry->module_id = module->module_id;
|
||||||
|
__entry->num_interfaces = module->num_interfaces;
|
||||||
__entry->disconnected = module->disconnected;
|
__entry->disconnected = module->disconnected;
|
||||||
),
|
),
|
||||||
|
|
||||||
TP_printk("greybus: hd_bus_id=%d module_id=%hhu disconnected=%d",
|
TP_printk("greybus: hd_bus_id=%d module_id=%hhu num_interfaces=%zu disconnected=%d",
|
||||||
__entry->hd_bus_id, __entry->module_id, __entry->disconnected)
|
__entry->hd_bus_id, __entry->module_id,
|
||||||
|
__entry->num_interfaces, __entry->disconnected)
|
||||||
);
|
);
|
||||||
|
|
||||||
#define DEFINE_MODULE_EVENT(name) \
|
#define DEFINE_MODULE_EVENT(name) \
|
||||||
|
|||||||
Reference in New Issue
Block a user