* [PATCH] RDS: constify rhashtable_params
@ 2017-08-30 11:49 Arvind Yadav
2017-08-30 13:54 ` santosh.shilimkar
0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-08-30 11:49 UTC (permalink / raw)
To: davem, santosh.shilimkar; +Cc: linux-kernel, rds-devel, linux-rdma, netdev
rhashtable_params are not supposed to change at runtime. All
Functions rhashtable_* working with const rhashtable_params
provided by <linux/rhashtable.h>. So mark the non-const structs
as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
net/rds/bind.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/rds/bind.c b/net/rds/bind.c
index 3a915be..75d43dc 100644
--- a/net/rds/bind.c
+++ b/net/rds/bind.c
@@ -40,7 +40,7 @@
static struct rhashtable bind_hash_table;
-static struct rhashtable_params ht_parms = {
+static const struct rhashtable_params ht_parms = {
.nelem_hint = 768,
.key_len = sizeof(u64),
.key_offset = offsetof(struct rds_sock, rs_bound_key),
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-30 13:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-30 11:49 [PATCH] RDS: constify rhashtable_params Arvind Yadav
2017-08-30 13:54 ` santosh.shilimkar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox