[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f6c35abbbecb43c49b5bd4893ab1128d@AcuMS.aculab.com>
Date: Wed, 29 Nov 2017 13:49:01 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Xie XiuQi' <xiexiuqi@...wei.com>,
"rostedt@...dmis.org" <rostedt@...dmis.org>,
"mingo@...hat.com" <mingo@...hat.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"brouer@...hat.com" <brouer@...hat.com>
CC: "daniel@...earbox.net" <daniel@...earbox.net>,
"ast@...nel.org" <ast@...nel.org>,
"kstewart@...uxfoundation.org" <kstewart@...uxfoundation.org>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"john.fastabend@...il.com" <john.fastabend@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"huangdaode@...ilicon.com" <huangdaode@...ilicon.com>,
Hanjun Guo <guohanjun@...wei.com>
Subject: RE: [PATCH] trace/xdp: fix compile warning: ‘struct bpf_map’ declared inside parameter list
From: Xie XiuQi
> Sent: 29 November 2017 08:35
>
> We meet this compile warning, which caused by missing bpf.h in xdp.h.
>
> In file included from ./include/trace/events/xdp.h:10:0,
> from ./include/linux/bpf_trace.h:6,
> from drivers/net/ethernet/intel/i40e/i40e_txrx.c:29:
> ./include/trace/events/xdp.h:93:17: warning: struct bpf_map declared inside parameter list will not be
> visible outside of this definition or declaration
> const struct bpf_map *map, u32 map_index),
> ^
...
> diff --git a/include/trace/events/xdp.h b/include/trace/events/xdp.h
> index 4cd0f05..8989a92 100644
> --- a/include/trace/events/xdp.h
> +++ b/include/trace/events/xdp.h
> @@ -8,6 +8,7 @@
> #include <linux/netdevice.h>
> #include <linux/filter.h>
> #include <linux/tracepoint.h>
> +#include <linux/bpf.h>
Isn't it just enough to add:
struct bpf_map;
before the first prototype instead of pulling in the entire header?
David
Powered by blists - more mailing lists