Skip to content

Commit 67059b6

Browse files
Yang Liummakynes
authored andcommitted
netfilter: nft_set_rbtree: Remove unused variable nft_net
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> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent 4b7b492 commit 67059b6

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

net/netfilter/nft_set_rbtree.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,14 +624,12 @@ static void nft_rbtree_gc(struct nft_set *set)
624624
{
625625
struct nft_rbtree *priv = nft_set_priv(set);
626626
struct nft_rbtree_elem *rbe, *rbe_end = NULL;
627-
struct nftables_pernet *nft_net;
628627
struct rb_node *node, *next;
629628
struct nft_trans_gc *gc;
630629
struct net *net;
631630

632631
set = nft_set_container_of(priv);
633632
net = read_pnet(&set->net);
634-
nft_net = nft_pernet(net);
635633

636634
gc = nft_trans_gc_alloc(set, 0, GFP_KERNEL);
637635
if (!gc)

0 commit comments

Comments
 (0)