Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751727AbdH3Lsf (ORCPT ); Wed, 30 Aug 2017 07:48:35 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:33542 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751470AbdH3Lsd (ORCPT ); Wed, 30 Aug 2017 07:48:33 -0400 From: Arvind Yadav To: davem@davemloft.net, fw@strlen.de, kadlec@blackhole.kfki.hu, pablo@netfilter.org Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, coreteam@netfilter.org, netfilter-devel@vger.kernel.org Subject: [PATCH] netfilter: nat: constify rhashtable_params Date: Wed, 30 Aug 2017 17:18:04 +0530 Message-Id: X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 880 Lines: 25 rhashtable_params are not supposed to change at runtime. All Functions rhashtable_* working with const rhashtable_params provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- net/netfilter/nf_nat_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c index eb54178..d1f355e 100644 --- a/net/netfilter/nf_nat_core.c +++ b/net/netfilter/nf_nat_core.c @@ -198,7 +198,7 @@ static int nf_nat_bysource_cmp(struct rhashtable_compare_arg *arg, return 0; } -static struct rhashtable_params nf_nat_bysource_params = { +static const struct rhashtable_params nf_nat_bysource_params = { .head_offset = offsetof(struct nf_conn, nat_bysource), .obj_hashfn = nf_nat_bysource_hash, .obj_cmpfn = nf_nat_bysource_cmp, -- 1.9.1