2021-08-23 05:22:31

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the chrome-platform tree

Hi all,

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")

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-08-30 07:23:57

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the chrome-platform tree

Hi all,

On Mon, 23 Aug 2021 15:21:34 +1000 Stephen Rothwell <[email protected]> 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


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-08-31 00:18:48

by Benson Leung

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the chrome-platform tree

Hi Stephen,

On Mon, Aug 30, 2021 at 05:21:32PM +1000, Stephen Rothwell wrote:
> > Introduced by commit
> >
> > d453ceb6549a ("platform/chrome: sensorhub: Add trace events for sample")
>
> I am still seeing these warnings.
> --
> Cheers,
> Stephen Rothwell

I've just pushed this to chrome-platform's for-next:
5a51bdb0ae26 ("platform/chrome: cros_ec_trace: Fix format warnings")

This should fix those warnings. Sorry for the long delay.


--
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
[email protected]
Chromium OS Project
[email protected]


Attachments:
(No filename) (602.00 B)
signature.asc (235.00 B)
Download all attachments

2021-08-31 00:34:31

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the chrome-platform tree

Hi Benson,

On Mon, 30 Aug 2021 17:17:45 -0700 Benson Leung <[email protected]> wrote:
>
> On Mon, Aug 30, 2021 at 05:21:32PM +1000, Stephen Rothwell wrote:
> > > Introduced by commit
> > >
> > > d453ceb6549a ("platform/chrome: sensorhub: Add trace events for sample")
> >
> > I am still seeing these warnings.
> > --
> > Cheers,
> > Stephen Rothwell
>
> I've just pushed this to chrome-platform's for-next:
> 5a51bdb0ae26 ("platform/chrome: cros_ec_trace: Fix format warnings")
>
> This should fix those warnings. Sorry for the long delay.

Thanks.
--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature