From patchwork Mon Oct 24 17:19:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 13018064 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B423FFA3741 for ; Mon, 24 Oct 2022 19:54:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233422AbiJXTyr (ORCPT ); Mon, 24 Oct 2022 15:54:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234020AbiJXTyR (ORCPT ); Mon, 24 Oct 2022 15:54:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1BC625708A for ; Mon, 24 Oct 2022 11:18:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6BC8E614A4 for ; Mon, 24 Oct 2022 17:19:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C12DC433C1; Mon, 24 Oct 2022 17:19:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666631976; bh=NJjrAstxruXUqSEjk/XuL+tXLef5NEMMkb1Ncn2E8GQ=; h=From:To:Cc:Subject:Date:From; b=Ozb4lrU6cQ1Skh9hn6lp7N+qTdVpBR2/+NQ0JqTk69ea09p0ZwRxK2QZj+4GpKV75 oe3pdvqLOSdpnKoZnkffy5kNuXDG0am0f9fLEhTcn7lfcX8kFU+R0tWoRfX34lJo26 FmC1O8pUSOVCRFFzLWGFhXspdgkYeFSrZcNl7+FBzqNJLzi6+PUZ5h2hjXnJUxMo3l OVaMQG9ojuLxRXQPqEO4V5yh4UJu2hjxz1qeSRkOW/65ROrVagP6X4FfcDYFSIEa++ 7H/wYbhRSHWP2gtqh+YqoHNRlZODRSybAiK6TNVCRHIMDGcXJENGLYyArehmOXiLLD oQYeT/PHh6bkQ== From: Leon Romanovsky To: Steffen Klassert Cc: Leon Romanovsky , "David S. Miller" , Eric Dumazet , Herbert Xu , Jakub Kicinski , netdev@vger.kernel.org, Paolo Abeni Subject: [PATCH xfrm-next] xfrm: Remove not-used total variable Date: Mon, 24 Oct 2022 20:19:31 +0300 Message-Id: X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Leon Romanovsky Total variable is not used in xfrm_byidx_resize() and can be safely removed. Signed-off-by: Leon Romanovsky --- net/xfrm/xfrm_policy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index aa73e630aef5..405ec6842e04 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -606,7 +606,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); @@ -684,7 +684,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); }