Re: linux-next: build warning after merge of the chrome-platform tree

Stephen Rothwell
2021-08-30T07:21:51Z

[-- Attachment #1: Type: text/plain, Size: 8996 bytes --]

Hi all,

On Mon, 23 Aug 2021 15:21:34 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the chrome-platform tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
>
> In file included from include/trace/define_trace.h:102,
> from drivers/platform/chrome/cros_ec_trace.h:178,
> from drivers/platform/chrome/cros_ec_trace.c:215:
> drivers/platform/chrome/./cros_ec_trace.h: In function 'trace_raw_output_cros_ec_sensorhub_timestamp':
> drivers/platform/chrome/./cros_ec_trace.h:95:12: warning: format '%lld' expects argument of type 'long long int', but argument 3 has type 'u32' {aka 'unsigned int'} [-Wformat=]
> 95 | TP_printk("ec_ts: %12lld, ec_fifo_ts: %12lld, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/trace/trace_events.h:399:27: note: in definition of macro 'DECLARE_EVENT_CLASS'
> 399 | trace_event_printf(iter, print); \
> | ^~~~~
> include/trace/trace_events.h:80:9: note: in expansion of macro 'PARAMS'
> 80 | PARAMS(print)); \
> | ^~~~~~
> drivers/platform/chrome/./cros_ec_trace.h:74:1: note: in expansion of macro 'TRACE_EVENT'
> 74 | TRACE_EVENT(cros_ec_sensorhub_timestamp,
> | ^~~~~~~~~~~
> drivers/platform/chrome/./cros_ec_trace.h:95:2: note: in expansion of macro 'TP_printk'
> 95 | TP_printk("ec_ts: %12lld, ec_fifo_ts: %12lld, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",
> | ^~~~~~~~~
> In file included from include/trace/trace_events.h:433,
> from include/trace/define_trace.h:102,
> from drivers/platform/chrome/cros_ec_trace.h:178,
> from drivers/platform/chrome/cros_ec_trace.c:215:
> drivers/platform/chrome/./cros_ec_trace.h:95:25: note: format string is defined here
> 95 | TP_printk("ec_ts: %12lld, ec_fifo_ts: %12lld, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",
> | ~~~~~^
> | |
> | long long int
> | %12d
> In file included from include/trace/define_trace.h:102,
> from drivers/platform/chrome/cros_ec_trace.h:178,
> from drivers/platform/chrome/cros_ec_trace.c:215:
> drivers/platform/chrome/./cros_ec_trace.h:95:12: warning: format '%lld' expects argument of type 'long long int', but argument 4 has type 'u32' {aka 'unsigned int'} [-Wformat=]
> 95 | TP_printk("ec_ts: %12lld, ec_fifo_ts: %12lld, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/trace/trace_events.h:399:27: note: in definition of macro 'DECLARE_EVENT_CLASS'
> 399 | trace_event_printf(iter, print); \
> | ^~~~~
> include/trace/trace_events.h:80:9: note: in expansion of macro 'PARAMS'
> 80 | PARAMS(print)); \
> | ^~~~~~
> drivers/platform/chrome/./cros_ec_trace.h:74:1: note: in expansion of macro 'TRACE_EVENT'
> 74 | TRACE_EVENT(cros_ec_sensorhub_timestamp,
> | ^~~~~~~~~~~
> drivers/platform/chrome/./cros_ec_trace.h:95:2: note: in expansion of macro 'TP_printk'
> 95 | TP_printk("ec_ts: %12lld, ec_fifo_ts: %12lld, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",
> | ^~~~~~~~~
> In file included from include/trace/trace_events.h:433,
> from include/trace/define_trace.h:102,
> from drivers/platform/chrome/cros_ec_trace.h:178,
> from drivers/platform/chrome/cros_ec_trace.c:215:
> drivers/platform/chrome/./cros_ec_trace.h:95:45: note: format string is defined here
> 95 | TP_printk("ec_ts: %12lld, ec_fifo_ts: %12lld, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",
> | ~~~~~^
> | |
> | long long int
> | %12d
> In file included from include/trace/define_trace.h:102,
> from drivers/platform/chrome/cros_ec_trace.h:178,
> from drivers/platform/chrome/cros_ec_trace.c:215:
> drivers/platform/chrome/./cros_ec_trace.h: In function 'trace_raw_output_cros_ec_sensorhub_data':
> drivers/platform/chrome/./cros_ec_trace.h:125:12: warning: format '%lld' expects argument of type 'long long int', but argument 4 has type 'u32' {aka 'unsigned int'} [-Wformat=]
> 125 | TP_printk("ec_num: %4d, ec_fifo_ts: %12lld, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/trace/trace_events.h:399:27: note: in definition of macro 'DECLARE_EVENT_CLASS'
> 399 | trace_event_printf(iter, print); \
> | ^~~~~
> include/trace/trace_events.h:80:9: note: in expansion of macro 'PARAMS'
> 80 | PARAMS(print)); \
> | ^~~~~~
> drivers/platform/chrome/./cros_ec_trace.h:105:1: note: in expansion of macro 'TRACE_EVENT'
> 105 | TRACE_EVENT(cros_ec_sensorhub_data,
> | ^~~~~~~~~~~
> drivers/platform/chrome/./cros_ec_trace.h:125:2: note: in expansion of macro 'TP_printk'
> 125 | TP_printk("ec_num: %4d, ec_fifo_ts: %12lld, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",
> | ^~~~~~~~~
> In file included from include/trace/trace_events.h:433,
> from include/trace/define_trace.h:102,
> from drivers/platform/chrome/cros_ec_trace.h:178,
> from drivers/platform/chrome/cros_ec_trace.c:215:
> drivers/platform/chrome/./cros_ec_trace.h:125:43: note: format string is defined here
> 125 | TP_printk("ec_num: %4d, ec_fifo_ts: %12lld, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",
> | ~~~~~^
> | |
> | long long int
> | %12d
> In file included from include/trace/define_trace.h:102,
> from drivers/platform/chrome/cros_ec_trace.h:178,
> from drivers/platform/chrome/cros_ec_trace.c:215:
> drivers/platform/chrome/./cros_ec_trace.h: In function 'trace_raw_output_cros_ec_sensorhub_filter':
> drivers/platform/chrome/./cros_ec_trace.h:156:12: warning: format '%d' expects argument of type 'int', but argument 7 has type 's64' {aka 'long long int'} [-Wformat=]
> 156 | TP_printk("dx: %12lld. dy: %12lld median_m: %12lld median_error: %12lld len: %d x: %12lld y: %12lld",
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/trace/trace_events.h:399:27: note: in definition of macro 'DECLARE_EVENT_CLASS'
> 399 | trace_event_printf(iter, print); \
> | ^~~~~
> include/trace/trace_events.h:80:9: note: in expansion of macro 'PARAMS'
> 80 | PARAMS(print)); \
> | ^~~~~~
> drivers/platform/chrome/./cros_ec_trace.h:135:1: note: in expansion of macro 'TRACE_EVENT'
> 135 | TRACE_EVENT(cros_ec_sensorhub_filter,
> | ^~~~~~~~~~~
> drivers/platform/chrome/./cros_ec_trace.h:156:2: note: in expansion of macro 'TP_printk'
> 156 | TP_printk("dx: %12lld. dy: %12lld median_m: %12lld median_error: %12lld len: %d x: %12lld y: %12lld",
> | ^~~~~~~~~
> In file included from include/trace/trace_events.h:433,
> from include/trace/define_trace.h:102,
> from drivers/platform/chrome/cros_ec_trace.h:178,
> from drivers/platform/chrome/cros_ec_trace.c:215:
> drivers/platform/chrome/./cros_ec_trace.h:156:80: note: format string is defined here
> 156 | TP_printk("dx: %12lld. dy: %12lld median_m: %12lld median_error: %12lld len: %d x: %12lld y: %12lld",
> | ~^
> | |
> | int
> | %lld
>
> Introduced by commit
>
> d453ceb6549a ("platform/chrome: sensorhub: Add trace events for sample")

I am still seeing these warnings.
--
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]