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

From: Stephen Rothwell
Date: Thu Aug 29 2019 - 00:08:33 EST


Hi all,

On Thu, 29 Aug 2019 13:51:50 +1000 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
>
> After merging the block tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> In file included from include/trace/events/iocost.h:8,
> from <command-line>:
> include/trace/events/iocost.h:12:57: warning: 'struct ioc_now' declared inside parameter list will not be visible outside of this definition or declaration
> TP_PROTO(struct ioc_gq *iocg, const char *path, struct ioc_now *now,
> ^~~~~~~
> include/linux/tracepoint.h:233:34: note: in definition of macro '__DECLARE_TRACE'
> static inline void trace_##name(proto) \
> ^~~~~
> include/linux/tracepoint.h:396:24: note: in expansion of macro 'PARAMS'
> __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> ^~~~~~
> include/linux/tracepoint.h:532:2: note: in expansion of macro 'DECLARE_TRACE'
> DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> ^~~~~~~~~~~~~
> include/linux/tracepoint.h:532:22: note: in expansion of macro 'PARAMS'
> DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> ^~~~~~
> include/trace/events/iocost.h:10:1: note: in expansion of macro 'TRACE_EVENT'
> TRACE_EVENT(iocost_iocg_activate,
> ^~~~~~~~~~~
> include/trace/events/iocost.h:12:2: note: in expansion of macro 'TP_PROTO'
> TP_PROTO(struct ioc_gq *iocg, const char *path, struct ioc_now *now,
> ^~~~~~~~
> include/trace/events/iocost.h:12:18: warning: 'struct ioc_gq' declared inside parameter list will not be visible outside of this definition or declaration
> TP_PROTO(struct ioc_gq *iocg, const char *path, struct ioc_now *now,
> ^~~~~~
> include/linux/tracepoint.h:233:34: note: in definition of macro '__DECLARE_TRACE'
> static inline void trace_##name(proto) \
> ^~~~~
> include/linux/tracepoint.h:396:24: note: in expansion of macro 'PARAMS'
> __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> ^~~~~~
> include/linux/tracepoint.h:532:2: note: in expansion of macro 'DECLARE_TRACE'
> DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> ^~~~~~~~~~~~~
> include/linux/tracepoint.h:532:22: note: in expansion of macro 'PARAMS'
> DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> ^~~~~~
> include/trace/events/iocost.h:10:1: note: in expansion of macro 'TRACE_EVENT'
> TRACE_EVENT(iocost_iocg_activate,
> ^~~~~~~~~~~
> include/trace/events/iocost.h:12:2: note: in expansion of macro 'TP_PROTO'
> TP_PROTO(struct ioc_gq *iocg, const char *path, struct ioc_now *now,
> ^~~~~~~~
>
> (and many more)
>
> Introduced by commit
>
> 7caa47151ab2 ("blkcg: implement blk-iocost")
>
> To get these warnings you need to build with CONFIG_HEADER_TEST and
> CONFIG_KERNEL_HEADER_TEST (and maybe CONFIG_UAPI_HEADER_TEST).
> allmodconfig does that.

I have applied this patch to linux-next for today:

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Thu, 29 Aug 2019 14:03:43 +1000
Subject: [PATCH] blkcg: blk-iocost: predeclare used structs

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
include/trace/events/iocost.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/include/trace/events/iocost.h b/include/trace/events/iocost.h
index ec2217dd57ac..7ecaa65b7106 100644
--- a/include/trace/events/iocost.h
+++ b/include/trace/events/iocost.h
@@ -2,6 +2,10 @@
#undef TRACE_SYSTEM
#define TRACE_SYSTEM iocost

+struct ioc;
+struct ioc_now;
+struct ioc_gq;
+
#if !defined(_TRACE_BLK_IOCOST_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_BLK_IOCOST_H

--
2.20.1

--
Cheers,
Stephen Rothwell

Attachment: pgpVPe7HLAahW.pgp
Description: OpenPGP digital signature