[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140208200951.GE20885@leaf>
Date: Sat, 8 Feb 2014 12:09:52 -0800
From: Josh Triplett <josh@...htriplett.org>
To: Rashika Kheria <rashika.kheria@...il.com>
Cc: linux-kernel@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Alexei Starovoitov <ast@...mgrid.com>,
Nicolas Dichtel <nicolas.dichtel@...nd.com>,
Daniel Borkmann <dborkman@...hat.com>, netdev@...r.kernel.org
Subject: Re: [PATCH 05/13] net: Mark function as static in core/filter.c
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 <rashika.kheria@...il.com>
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists