Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp624079rdb; Tue, 31 Oct 2023 18:34:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEFDRZ+yNzsfRvtnLG0A2GHNRLzRi4TXGQs8fObmU/Ys5AJPQeByo9ipODTKQUU+rt6I65t X-Received: by 2002:a17:902:e54e:b0:1cc:3fe1:f45e with SMTP id n14-20020a170902e54e00b001cc3fe1f45emr8747530plf.27.1698802477070; Tue, 31 Oct 2023 18:34:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698802477; cv=none; d=google.com; s=arc-20160816; b=tmf4K6ANiKuPlNIrFxLTrhET6Mj7iqvHle/J4rxK179wkzQ3JRUokUMgfb8c2/g0cT wDfxtJdap9N/yHa0Ntg9f0NV+uqjDfV6Pqp6TGK8iUiq3G2i0OEzQbiWiWpg1pmuls/o etmIrVr4hSRb1PMm2GnuruJDr8FYlQeivHW6R5d4en2jL2DS5DpS6PWLRgI+ecdvt0Ko a+XrK7U6CXS1OV6nq/bK8W4VbAbnxgKewIhBi3f47Rfm15MGjlO3VeVRlTMRtwf6JKS/ kLteE6tNPMnOGZjFAqLjAYhxcBMDO/fwKmv/AGAozX1shircu6fr9DPQ7GxxF7M6Na+q NvLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ko2nqh3ujLQOpkJG+SA37jO+SFYRZGn1oechi4dDkMM=; fh=vlKyCik9TIQnSBpSChX00cLL73Euh2EpWgSBnjF55kA=; b=Uf6IJtr7h3pqGrJQeQ2Qf82yajKY4qAIjlu8gfk0ulG+6crzuT0lM30VBDucIAhdtd t2xpFhfyaYVSCgvAPHJUTCZ05/VGcbFSh5wwyFPIt9z89lkFDFSI06riDuTXlY4k0hDF pjXBPeszkWVs1UvtWoqbKcWrp75Nz34e/jTEm10CctCO+kHQbQ6nbrAiPraj5TZR/Pk5 UxytRaVz6laBFiORYEZiv8ZbPQBruD0pJqE50JDRz+zbMo8GpRggfXmXp/7KugnN5Vw1 rPJtGvY7GvIy0X1u7hlNysOMrzkR6hzDTlm5xPTOZdIjdZ0AfWwm7tR0nPjHmRxKVahX kRxw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id o14-20020a170902d4ce00b001bf1d1d99b0si1994796plg.568.2023.10.31.18.34.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 18:34:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 427DD8026458; Tue, 31 Oct 2023 18:34:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377010AbjKABeG (ORCPT + 99 others); Tue, 31 Oct 2023 21:34:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236805AbjKABeE (ORCPT ); Tue, 31 Oct 2023 21:34:04 -0400 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3822F5; Tue, 31 Oct 2023 18:33:56 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R541e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0VvIs3FX_1698802432; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VvIs3FX_1698802432) by smtp.aliyun-inc.com; Wed, 01 Nov 2023 09:33:53 +0800 From: Yang Li To: kuba@kernel.org, edumazet@google.com, davem@davemloft.net, pabeni@redhat.com, fw@strlen.de, kadlec@netfilter.org, pablo@netfilter.org Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH net-next] netfilter: nf_tables: Remove unused variable nft_net Date: Wed, 1 Nov 2023 09:33:51 +0800 Message-Id: <20231101013351.55902-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Type: text/plain; charset=n Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 31 Oct 2023 18:34:28 -0700 (PDT) The code that uses nft_net has been removed, and the nft_pernet function is merely obtaining a reference to shared data through the net pointer. The content of the net pointer is not modified or changed, so both of them should be removed. silence the warning: net/netfilter/nft_set_rbtree.c:627:26: warning: variable ‘nft_net’ set but not used Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7103 Signed-off-by: Yang Li --- net/netfilter/nft_set_rbtree.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/netfilter/nft_set_rbtree.c b/net/netfilter/nft_set_rbtree.c index 6f1186abd47b..baa3fea4fe65 100644 --- a/net/netfilter/nft_set_rbtree.c +++ b/net/netfilter/nft_set_rbtree.c @@ -624,14 +624,12 @@ static void nft_rbtree_gc(struct nft_set *set) { struct nft_rbtree *priv = nft_set_priv(set); struct nft_rbtree_elem *rbe, *rbe_end = NULL; - struct nftables_pernet *nft_net; struct rb_node *node, *next; struct nft_trans_gc *gc; struct net *net; set = nft_set_container_of(priv); net = read_pnet(&set->net); - nft_net = nft_pernet(net); gc = nft_trans_gc_alloc(set, 0, GFP_KERNEL); if (!gc) -- 2.20.1.7.g153144c