[PATCH -next] netfilter: nft_hash: fix non static symbol warning

Subsystems: netfilter, networking [general], the rest

STALE3646d

2 messages, 2 authors, 2016-08-22 · open the first message on its own page

[PATCH -next] netfilter: nft_hash: fix non static symbol warning

From: Wei Yongjun <hidden>
Date: 2016-08-21 15:21:36

Fixes the following sparse warning:

net/netfilter/nft_hash.c:40:25: warning:
 symbol 'nft_hash_policy' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <redacted>
---
 net/netfilter/nft_hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/nft_hash.c b/net/netfilter/nft_hash.c
index b82ff29..e090aee 100644
--- a/net/netfilter/nft_hash.c
+++ b/net/netfilter/nft_hash.c
@@ -37,7 +37,7 @@ static void nft_hash_eval(const struct nft_expr *expr,
 				 priv->modulus);
 }
 
-const struct nla_policy nft_hash_policy[NFTA_HASH_MAX + 1] = {
+static const struct nla_policy nft_hash_policy[NFTA_HASH_MAX + 1] = {
 	[NFTA_HASH_SREG]	= { .type = NLA_U32 },
 	[NFTA_HASH_DREG]	= { .type = NLA_U32 },
 	[NFTA_HASH_LEN]		= { .type = NLA_U32 },

Re: [PATCH -next] netfilter: nft_hash: fix non static symbol warning

From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: 2016-08-22 09:45:32

On Sun, Aug 21, 2016 at 03:21:10PM +0000, Wei Yongjun wrote:
Fixes the following sparse warning:

net/netfilter/nft_hash.c:40:25: warning:
 symbol 'nft_hash_policy' was not declared. Should it be static?
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help