Message ID | 20231101013351.55902-1-yang.lee@linux.alibaba.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:abcd:0:b0:403:3b70:6f57 with SMTP id f13csp130467vqx; Tue, 31 Oct 2023 18:34:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEOx0nySobVJV8qBK5cab5ounIWRU/SUhGyrYXowygsOaYCM78b/wZy9Ay7j8lThxP5PYIN X-Received: by 2002:a17:903:2450:b0:1cc:70e4:28e9 with SMTP id l16-20020a170903245000b001cc70e428e9mr2061948pls.49.1698802483107; Tue, 31 Oct 2023 18:34:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698802483; cv=none; d=google.com; s=arc-20160816; b=vCKO7ZqMh9+wMujsP+q6Yq6xidvCZ+ihTlEgmMF+tMT2zD2DejMIl5sO4iobrR15pr HHwc7sKP2kHd68V781yx+SYiSWBOe/CTW3D0YwM2z1nKpWxwB74KsQgfi2yD+XTusAw4 HrQO5E7H2CBcgPgsewGSdBZGwpdjlkn9c4rwsCwSxSuRk5RYUkX11kVD8Beh92pzRWbz F0gMfPQ/WYniwhwdgjpcxlRskvZxbbM06uuvf+Nuxu6P/a1xoOm+hNPeD7fag+YWlzyU MXKuqYFEYaxVva6vCz6qVV2BqQGQwVjoO4G48LG87UwxPJd8oRtWF2E9KWM3s+ntpLQ2 hMJQ== 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.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id g12-20020a170902c98c00b001c9cc3a07c3si1828893plc.280.2023.10.31.18.34.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 18:34:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 209F18023912; Tue, 31 Oct 2023 18:34:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377013AbjKABeG (ORCPT <rfc822;gah0developer@gmail.com> + 34 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <yang.lee@linux.alibaba.com> 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 <yang.lee@linux.alibaba.com>, Abaci Robot <abaci@linux.alibaba.com> 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 howler.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 31 Oct 2023 18:34:38 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781323512153158488 X-GMAIL-MSGID: 1781323512153158488 |
Series |
[net-next] netfilter: nf_tables: Remove unused variable nft_net
|
|
Commit Message
Yang Li
Nov. 1, 2023, 1:33 a.m. UTC
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 <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7103
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
net/netfilter/nft_set_rbtree.c | 2 --
1 file changed, 2 deletions(-)
Comments
On Wed, Nov 01, 2023 at 09:33:51AM +0800, Yang Li wrote: > 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 <abaci@linux.alibaba.com> > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7103 > Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> I think this is for nf-next, rather than net-next (which is closed). But as for the change itself, I also noticed this, and am glad to see it being addressed. Reviewed-by: Simon Horman <horms@kernel.org>
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)