From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesper Dangaard Brouer Subject: Re: [PATCH] trace/xdp: fix compile warning: =?UTF-8?B?4oCYc3Ry?= =?UTF-8?B?dWN0IGJwZl9tYXDigJk=?= declared inside parameter list Date: Wed, 29 Nov 2017 10:15:30 +0100 Message-ID: <20171129101530.75261e91@redhat.com> References: <1511944501-160820-1-git-send-email-xiexiuqi@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Cc: , , , , , , , , , , Hanjun Guo , brouer@redhat.com, "netdev@vger.kernel.org" To: Xie XiuQi Return-path: Received: from mx1.redhat.com ([209.132.183.28]:40778 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753341AbdK2JPj (ORCPT ); Wed, 29 Nov 2017 04:15:39 -0500 In-Reply-To: <1511944501-160820-1-git-send-email-xiexiuqi@huawei.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, 29 Nov 2017 16:35:01 +0800 Xie XiuQi wrote: > 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), > ^ > ./include/linux/tracepoint.h:187:34: note: in definition of macro ‘__DECLARE_TRACE’ > static inline void trace_##name(proto) \ > ^~~~~ > ./include/linux/tracepoint.h:352:24: note: in expansion of macro ‘PARAMS’ > __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \ > ^~~~~~ > ./include/linux/tracepoint.h:477:2: note: in expansion of macro ‘DECLARE_TRACE’ > DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) > ^~~~~~~~~~~~~ > ./include/linux/tracepoint.h:477:22: note: in expansion of macro ‘PARAMS’ > DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) > ^~~~~~ > ./include/trace/events/xdp.h:89:1: note: in expansion of macro ‘DEFINE_EVENT’ > DEFINE_EVENT(xdp_redirect_template, xdp_redirect, > ^~~~~~~~~~~~ > ./include/trace/events/xdp.h:90:2: note: in expansion of macro ‘TP_PROTO’ > TP_PROTO(const struct net_device *dev, > ^~~~~~~~ > ./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), > ^ > ./include/linux/tracepoint.h:203:38: note: in definition of macro ‘__DECLARE_TRACE’ > register_trace_##name(void (*probe)(data_proto), void *data) \ > ^~~~~~~~~~ > ./include/linux/tracepoint.h:354:4: note: in expansion of macro ‘PARAMS’ > PARAMS(void *__data, proto), \ > ^~~~~~ > > Reported-by: Huang Daode > Cc: Hanjun Guo > Signed-off-by: Xie XiuQi > --- > include/trace/events/xdp.h | 1 + > 1 file changed, 1 insertion(+) > > 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 > #include > #include > +#include > > #define __XDP_ACT_MAP(FN) \ > FN(ABORTED) \ Strange that I'm not see this compile issue, and kbuild-bot also didn't report it, but the patch looks okay to me... I guess I introduced the issue in below "fixes" commit. Can the person applying this include the fixes line? Fixes: 8d3b778ff544 ("xdp: tracepoint xdp_redirect also need a map argument") Acked-by: Jesper Dangaard Brouer -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer