Re: [PATCH v2 2/4] siox: add support for tracing

From: Greg Kroah-Hartman
Date: Tue Dec 19 2017 - 03:28:27 EST


On Mon, Dec 18, 2017 at 05:59:08PM +0100, Uwe Kleine-KÃnig wrote:
> Implement tracing for SIOX. There are events for the data that is
> written to the bus and for data being read from it.
>
> Acked-by: Gavin Schenk <g.schenk@xxxxxxxxxxxx>
> Signed-off-by: Uwe Kleine-KÃnig <u.kleine-koenig@xxxxxxxxxxxxxx>
> ---
>
> Notes:
> Changes since v1, sent with Message-Id: 20171207093008.20688-3-u.kleine-koenig@xxxxxxxxxxxxxx
>
> - drop a WARN_ON
> - Added Steven Rostedt to Cc: now that the first patch is expected to stay
> more or less as it is.
>
> drivers/siox/siox-core.c | 12 +++++++++
> include/trace/events/siox.h | 66 +++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 78 insertions(+)
> create mode 100644 include/trace/events/siox.h

This patch gives me the following build warnings:

CC [M] drivers/siox/siox-core.o
In file included from ./include/trace/define_trace.h:96:0,
from ./include/trace/events/siox.h:66,
from drivers/siox/siox-core.c:37:
./include/trace/events/siox.h: In function âtrace_raw_output_siox_set_dataâ:
./include/trace/events/siox.h:27:16: warning: field width specifier â*â expects argument of type âintâ, but argument 5 has type âsize_t {aka long unsigned int}â [-Wformat=]
TP_printk("siox-%d-%u [%*phD]",
^
./include/trace/trace_events.h:360:22: note: in definition of macro âDECLARE_EVENT_CLASSâ
trace_seq_printf(s, print); \
^~~~~
./include/trace/trace_events.h:79:9: note: in expansion of macro âPARAMSâ
PARAMS(print)); \
^~~~~~
./include/trace/events/siox.h:9:1: note: in expansion of macro âTRACE_EVENTâ
TRACE_EVENT(siox_set_data,
^~~~~~~~~~~
./include/trace/events/siox.h:27:6: note: in expansion of macro âTP_printkâ
TP_printk("siox-%d-%u [%*phD]",
^~~~~~~~~
In file included from ./include/trace/trace_events.h:394:0,
from ./include/trace/define_trace.h:96,
from ./include/trace/events/siox.h:66,
from drivers/siox/siox-core.c:37:
./include/trace/events/siox.h:27:30: note: format string is defined here
TP_printk("siox-%d-%u [%*phD]",
~^~
In file included from ./include/trace/define_trace.h:96:0,
from ./include/trace/events/siox.h:66,
from drivers/siox/siox-core.c:37:
./include/trace/events/siox.h: In function âtrace_raw_output_siox_get_dataâ:
./include/trace/events/siox.h:55:16: warning: field width specifier â*â expects argument of type âintâ, but argument 6 has type âsize_t {aka long unsigned int}â [-Wformat=]
TP_printk("siox-%d-%u (%02hhx) [%*phD]",
^
./include/trace/trace_events.h:360:22: note: in definition of macro âDECLARE_EVENT_CLASSâ
trace_seq_printf(s, print); \
^~~~~
./include/trace/trace_events.h:79:9: note: in expansion of macro âPARAMSâ
PARAMS(print)); \
^~~~~~
./include/trace/events/siox.h:34:1: note: in expansion of macro âTRACE_EVENTâ
TRACE_EVENT(siox_get_data,
^~~~~~~~~~~
./include/trace/events/siox.h:55:6: note: in expansion of macro âTP_printkâ
TP_printk("siox-%d-%u (%02hhx) [%*phD]",
^~~~~~~~~
In file included from ./include/trace/trace_events.h:394:0,
from ./include/trace/define_trace.h:96,
from ./include/trace/events/siox.h:66,
from drivers/siox/siox-core.c:37:
./include/trace/events/siox.h:55:39: note: format string is defined here
TP_printk("siox-%d-%u (%02hhx) [%*phD]",
~^~


So I really can't take this as-is :(

I've applied the first patch to my tree now.

thanks,

greg k-h