Skip to contentSkip to conversation

netfilter: nft_set_pipapo_avx2: remove redundant pointer lt

PATCH Applied Colin Ian King 2 participants 2 messages Dec 21, 2021 – Dec 24, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netfilter: nft_set_pipapo_avx2: remove redundant pointer lt

The pointer lt is being assigned a value and then later updated but that value is never read. The pointer is redundant and can be removed.

---
 net/netfilter/nft_set_pipapo_avx2.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
net/netfilter/nft_set_pipapo_avx2.c +1 -3
index 6f4116e72958..52e0d026d30a 100644
@@ -1048,11 +1048,9 @@ static int nft_pipapo_avx2_lookup_slow(unsigned long *map, unsigned long *fill,
 					struct nft_pipapo_field *f, int offset,
 					const u8 *pkt, bool first, bool last)
 {
-	unsigned long *lt = f->lt, bsize = f->bsize;
+	unsigned long bsize = f->bsize;
 	int i, ret = -1, b;
 
-	lt += offset * NFT_PIPAPO_LONGS_PER_M256;
-
 	if (first)
 		memset(map, 0xff, bsize * sizeof(*map));
 
Signature · 1 line
2.33.1
maintainer Applied
#1 lore raw
Quoted 3 lines · Colin Ian King

The pointer lt is being assigned a value and then later updated but that value is never read. The pointer is redundant and can be removed.

Applied to nf-next, thanks