aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rhashtable.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-03-20 21:56:59 +1100
committerDavid S. Miller <davem@davemloft.net>2015-03-20 16:16:24 -0400
commit488fb86ee91d3b1182c2e30a9f9b45da14eda46f (patch)
treebcee7b730a66a4d7853310f8677778ccfb9484e3 /include/linux/rhashtable.h
parentebpf, filter: do not convert skb->protocol to host endianess during runtime (diff)
downloadlinux-dev-488fb86ee91d3b1182c2e30a9f9b45da14eda46f.tar.xz
linux-dev-488fb86ee91d3b1182c2e30a9f9b45da14eda46f.zip
rhashtable: Make rhashtable_init params argument const
This patch marks the rhashtable_init params argument const as there is no reason to modify it since we will always make a copy of it in the rhashtable. This patch also fixes a bug where we don't actually round up the value of min_size unless it is less than HASH_MIN_SIZE. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/rhashtable.h')
-rw-r--r--include/linux/rhashtable.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h
index 99425f2be708..c85363c45fc0 100644
--- a/include/linux/rhashtable.h
+++ b/include/linux/rhashtable.h
@@ -181,7 +181,8 @@ static inline int lockdep_rht_bucket_is_held(const struct bucket_table *tbl,
}
#endif /* CONFIG_PROVE_LOCKING */
-int rhashtable_init(struct rhashtable *ht, struct rhashtable_params *params);
+int rhashtable_init(struct rhashtable *ht,
+ const struct rhashtable_params *params);
void rhashtable_insert(struct rhashtable *ht, struct rhash_head *node);
bool rhashtable_remove(struct rhashtable *ht, struct rhash_head *node);