diff options
author | Alex Elder <elder@linaro.org> | 2016-06-03 15:55:29 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-06-03 17:03:23 -0700 |
commit | e5f23c45841ff371e4e515e8c5395fc659017930 (patch) | |
tree | 515c4f23293a24219fb793e1a1fc4396eb7674d9 /drivers/staging/greybus/greybus_trace.h | |
parent | 17ca677018117deee1bd75b301894dca975e7fc5 (diff) |
greybus: tracing: fix "make check" warnings
Some of the trace buffer fields were defined as Booleans. This
leads to two problems reported by "make check":
- the __field() macro (or some descendent macro) performs
a sizeof(bool) operation, which results in a warning
- The TP_printk() macro, which specifies a printf() style
format string, produces a warning when one attempts to
format a Boolean as an integer.
Fix both problems implicitly converting Boolean values from the data
structures into integers in the trace buffer.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/greybus_trace.h')
-rw-r--r-- | drivers/staging/greybus/greybus_trace.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/greybus/greybus_trace.h b/drivers/staging/greybus/greybus_trace.h index 148ffaf4c6b4..52a7ef5c4168 100644 --- a/drivers/staging/greybus/greybus_trace.h +++ b/drivers/staging/greybus/greybus_trace.h @@ -171,7 +171,7 @@ DECLARE_EVENT_CLASS(gb_module, __field(int, hd_bus_id) __field(u8, module_id) __field(u8, num_interfaces) - __field(bool, disconnected) + __field(int, disconnected) /* bool */ ), TP_fast_assign( @@ -180,7 +180,7 @@ DECLARE_EVENT_CLASS(gb_module, __entry->disconnected = module->disconnected; ), - TP_printk("greybus: hd_bus_id=%d module_id=%hhu disconnected=%u", + TP_printk("greybus: hd_bus_id=%d module_id=%hhu disconnected=%d", __entry->hd_bus_id, __entry->module_id, __entry->disconnected) ); @@ -224,10 +224,10 @@ DECLARE_EVENT_CLASS(gb_interface, __field(u8, id) /* Interface id */ __field(u8, module_id) __field(u8, device_id) - __field(bool, disconnected) - __field(bool, ejected) - __field(bool, active) - __field(bool, enabled) + __field(int, disconnected) /* bool */ + __field(int, ejected) /* bool */ + __field(int, active) /* bool */ + __field(int, enabled) /* bool */ ), TP_fast_assign( @@ -240,7 +240,7 @@ DECLARE_EVENT_CLASS(gb_interface, __entry->enabled = intf->enabled; ), - TP_printk("greybus: intf_id=%hhu device_id=%hhu module_id=%hhu D=%u J=%u A=%u E=%u", + TP_printk("greybus: intf_id=%hhu device_id=%hhu module_id=%hhu D=%d J=%d A=%d E=%d", __entry->id, __entry->device_id, __entry->module_id, __entry->disconnected, __entry->ejected, __entry->active, __entry->enabled) |