diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-05-22 19:47:40 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-05-29 13:46:14 +0300 |
commit | 187388bc3d63a9a3ae66b8dec255d0426eea2236 (patch) | |
tree | 9b9917b2a09db5a34ac56012808527306de7a021 /net | |
parent | 8f23f35f1e89656d766d6295cac23bac26f17de2 (diff) | |
download | linux-187388bc3d63a9a3ae66b8dec255d0426eea2236.tar.xz |
netfilter: nft_set_hash: unnecessary forward declaration
Replace struct rhashtable_params forward declaration by the structure
definition itself.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nft_set_hash.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/net/netfilter/nft_set_hash.c b/net/netfilter/nft_set_hash.c index 3d3a6df4ce70..850be3a00e62 100644 --- a/net/netfilter/nft_set_hash.c +++ b/net/netfilter/nft_set_hash.c @@ -40,8 +40,6 @@ struct nft_hash_cmp_arg { u8 genmask; }; -static const struct rhashtable_params nft_hash_params; - static inline u32 nft_hash_key(const void *data, u32 len, u32 seed) { const struct nft_hash_cmp_arg *arg = data; @@ -71,6 +69,14 @@ static inline int nft_hash_cmp(struct rhashtable_compare_arg *arg, return 0; } +static const struct rhashtable_params nft_hash_params = { + .head_offset = offsetof(struct nft_hash_elem, node), + .hashfn = nft_hash_key, + .obj_hashfn = nft_hash_obj, + .obj_cmpfn = nft_hash_cmp, + .automatic_shrinking = true, +}; + static bool nft_hash_lookup(const struct net *net, const struct nft_set *set, const u32 *key, const struct nft_set_ext **ext) { @@ -320,14 +326,6 @@ static unsigned int nft_hash_privsize(const struct nlattr * const nla[]) return sizeof(struct nft_hash); } -static const struct rhashtable_params nft_hash_params = { - .head_offset = offsetof(struct nft_hash_elem, node), - .hashfn = nft_hash_key, - .obj_hashfn = nft_hash_obj, - .obj_cmpfn = nft_hash_cmp, - .automatic_shrinking = true, -}; - static int nft_hash_init(const struct nft_set *set, const struct nft_set_desc *desc, const struct nlattr * const tb[]) |