mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: "'Xie XiuQi'" <xiexiuqi@huawei.com>,
	"rostedt@goodmis.org" <rostedt@goodmis.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"brouer@redhat.com" <brouer@redhat.com>
Cc: "daniel@iogearbox.net" <daniel@iogearbox.net>,
	"ast@kernel.org" <ast@kernel.org>,
	"kstewart@linuxfoundation.org" <kstewart@linuxfoundation.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"john.fastabend@gmail.com" <john.fastabend@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"huangdaode@hisilicon.com" <huangdaode@hisilicon.com>,
	Hanjun Guo <guohanjun@huawei.com>
Subject: RE: [PATCH] trace/xdp: fix compile warning: ‘struct bpf_map’ declared inside parameter list
Date: Wed, 29 Nov 2017 13:49:01 +0000	[thread overview]
Message-ID: <f6c35abbbecb43c49b5bd4893ab1128d@AcuMS.aculab.com> (raw)
In-Reply-To: <1511944501-160820-1-git-send-email-xiexiuqi@huawei.com>

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

  parent reply	other threads:[~2017-11-29 13:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-29  8:35 Xie XiuQi
2017-11-29  9:15 ` Jesper Dangaard Brouer
2017-11-29 11:13   ` Daniel Borkmann
2017-11-30  1:28     ` Xie XiuQi
2017-11-29 12:16 ` Steven Rostedt
2017-11-29 13:49 ` David Laight [this message]
2017-11-29 14:05   ` Jesper Dangaard Brouer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f6c35abbbecb43c49b5bd4893ab1128d@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=ast@kernel.org \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=guohanjun@huawei.com \
    --cc=huangdaode@hisilicon.com \
    --cc=john.fastabend@gmail.com \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=xiexiuqi@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome