* [PATCH net-next] netfilter: nf_tables: Remove unused variable nft_net
@ 2023-11-01 1:33 Yang Li
2023-11-04 16:33 ` Simon Horman
0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2023-11-01 1:33 UTC (permalink / raw)
To: kuba, edumazet, davem, pabeni, fw, kadlec, pablo
Cc: netfilter-devel, coreteam, netdev, linux-kernel, Yang Li,
Abaci Robot
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=n, Size: 1241 bytes --]
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(-)
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
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net-next] netfilter: nf_tables: Remove unused variable nft_net
2023-11-01 1:33 [PATCH net-next] netfilter: nf_tables: Remove unused variable nft_net Yang Li
@ 2023-11-04 16:33 ` Simon Horman
0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2023-11-04 16:33 UTC (permalink / raw)
To: Yang Li
Cc: kuba, edumazet, davem, pabeni, fw, kadlec, pablo, netfilter-devel,
coreteam, netdev, linux-kernel, Abaci Robot
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-04 16:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-01 1:33 [PATCH net-next] netfilter: nf_tables: Remove unused variable nft_net Yang Li
2023-11-04 16:33 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).