]> git.baikalelectronics.ru Git - kernel.git/commit
writeback: fix -Wformat compilation warnings
authorQian Cai <cai@lca.pw>
Thu, 14 Nov 2019 17:17:41 +0000 (12:17 -0500)
committerTejun Heo <tj@kernel.org>
Mon, 25 Nov 2019 15:50:41 +0000 (07:50 -0800)
commit1e90aa13292fd07007ec0c70ef3a1c6bc0ddd00f
tree0e93f635d85f402a9ea1914e49b449b34886127d
parent8a417b7fbd667b8c638e879d3ba9ab1cf7b9f9ec
writeback: fix -Wformat compilation warnings

The commit a871db13554c ("writeback: use ino_t for inodes in
tracepoints") introduced a lot of GCC compilation warnings on s390,

In file included from ./include/trace/define_trace.h:102,
                 from ./include/trace/events/writeback.h:904,
                 from fs/fs-writeback.c:82:
./include/trace/events/writeback.h: In function
'trace_raw_output_writeback_page_template':
./include/trace/events/writeback.h:76:12: warning: format '%lu' expects
argument of type 'long unsigned int', but argument 4 has type 'ino_t'
{aka 'unsigned int'} [-Wformat=]
  TP_printk("bdi %s: ino=%lu index=%lu",
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:360:22: note: in definition of macro
'DECLARE_EVENT_CLASS'
  trace_seq_printf(s, print);     \
                      ^~~~~
./include/trace/events/writeback.h:76:2: note: in expansion of macro
'TP_printk'
  TP_printk("bdi %s: ino=%lu index=%lu",
  ^~~~~~~~~

Fix them by adding necessary casts where ino_t could be either "unsigned
int" or "unsigned long".

Fixes: a871db13554c ("writeback: use ino_t for inodes in tracepoints")
Signed-off-by: Qian Cai <cai@lca.pw>
Signed-off-by: Tejun Heo <tj@kernel.org>
include/trace/events/writeback.h