xfrm: Remove not-used total variable
authorLeon Romanovsky <leonro@nvidia.com>
Mon, 24 Oct 2022 17:19:31 +0000 (20:19 +0300)
committerSteffen Klassert <steffen.klassert@secunet.com>
Tue, 25 Oct 2022 08:49:28 +0000 (10:49 +0200)
Total variable is not used in xfrm_byidx_resize() and can
be safely removed.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_policy.c

index e392d8d..d80519c 100644 (file)
@@ -605,7 +605,7 @@ static void xfrm_bydst_resize(struct net *net, int dir)
        xfrm_hash_free(odst, (hmask + 1) * sizeof(struct hlist_head));
 }
 
-static void xfrm_byidx_resize(struct net *net, int total)
+static void xfrm_byidx_resize(struct net *net)
 {
        unsigned int hmask = net->xfrm.policy_idx_hmask;
        unsigned int nhashmask = xfrm_new_hash_mask(hmask);
@@ -683,7 +683,7 @@ static void xfrm_hash_resize(struct work_struct *work)
                        xfrm_bydst_resize(net, dir);
        }
        if (xfrm_byidx_should_resize(net, total))
-               xfrm_byidx_resize(net, total);
+               xfrm_byidx_resize(net);
 
        mutex_unlock(&hash_resize_mutex);
 }