Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752242AbaBHUKF (ORCPT ); Sat, 8 Feb 2014 15:10:05 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:57028 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752043AbaBHUKC convert rfc822-to-8bit (ORCPT ); Sat, 8 Feb 2014 15:10:02 -0500 X-Originating-IP: 50.43.14.201 Date: Sat, 8 Feb 2014 12:09:52 -0800 From: Josh Triplett To: Rashika Kheria Cc: linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Alexei Starovoitov , Nicolas Dichtel , Daniel Borkmann , netdev@vger.kernel.org Subject: Re: [PATCH 05/13] net: Mark function as static in core/filter.c Message-ID: <20140208200951.GE20885@leaf> References: <6f029c895035908595957fb16ab445c82793c77d.1391888654.git.rashika.kheria@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 09, 2014 at 01:25:05AM +0530, Rashika Kheria wrote: > Mark function as static in core/filter.c because it is not used outside > this file. > > This eliminates the following warning in core/filter.c: > net/core/filter.c:48:7: warning: no previous prototype for ‘bpf_internal_load_pointer_neg_helper’ [-Wmissing-prototypes] > > Signed-off-by: Rashika Kheria This function actually is used outside this file, just not from C code; a couple of assembly files call it. (See also the comment above this definition: "Exported for the bpf jit load helper.") I'd suggest prototyping this function in include/linux/filter.h , unless someone on CC has another preference. > net/core/filter.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/net/core/filter.c b/net/core/filter.c > index ad30d62..a022dad 100644 > --- a/net/core/filter.c > +++ b/net/core/filter.c > @@ -44,7 +44,8 @@ > * > * Exported for the bpf jit load helper. > */ > -void *bpf_internal_load_pointer_neg_helper(const struct sk_buff *skb, int k, unsigned int size) > +static void *bpf_internal_load_pointer_neg_helper(const struct sk_buff *skb, > + int k, unsigned int size) > { > u8 *ptr = NULL; > > -- > 1.7.9.5 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/