Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751513AbdLATdA (ORCPT ); Fri, 1 Dec 2017 14:33:00 -0500 Received: from www62.your-server.de ([213.133.104.62]:46070 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750968AbdLATc7 (ORCPT ); Fri, 1 Dec 2017 14:32:59 -0500 Subject: Re: [PATCH] bpf: Fix compile warnings when !CONFIG_BPF_SYSCALL To: Jason Gunthorpe , Steven Rostedt , Ingo Molnar Cc: Jesper Dangaard Brouer , linux-kernel@vger.kernel.org, netdev@vger.kernel.org References: <20171201190605.GA21174@ziepe.ca> From: Daniel Borkmann Message-ID: <16009ff2-3edd-d3d7-4f2b-f9c408b5b71d@iogearbox.net> Date: Fri, 1 Dec 2017 20:32:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20171201190605.GA21174@ziepe.ca> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Authenticated-Sender: daniel@iogearbox.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1284 Lines: 38 On 12/01/2017 08:06 PM, Jason Gunthorpe wrote: > Such as: > > 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:94:17: warning: ‘struct bpf_map’ declared inside parameter list > const struct bpf_map *map, u32 map_index), > ^ > > By adding a forward declaration for struct bpf_map. In the > CONFIG_BPF_SYSCALL case the declaration comes in via > trace/events/bpf.h > > Fixes: 59a308967589 ("xdp: separate xdp_redirect tracepoint in map case") > Signed-off-by: Jason Gunthorpe Thanks! Fixed here already in the bpf tree: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/commit/?id=23721a755f98ac846897a013c92cccb281c1bcc8 > include/trace/events/xdp.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/trace/events/xdp.h b/include/trace/events/xdp.h > index 4cd0f05d01134d..36b2a9043189be 100644 > --- a/include/trace/events/xdp.h > +++ b/include/trace/events/xdp.h > @@ -9,6 +9,8 @@ > #include > #include > > +struct bpf_map; > + > #define __XDP_ACT_MAP(FN) \ > FN(ABORTED) \ > FN(DROP) \ >