Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: nft_set_pipapo: remove redundant test for avx feature bit

Sebastian points out that avx2 depends on avx, see check_cpufeature_deps()
in arch/x86/kernel/cpu/cpuid-deps.c:
avx2 feature bit will be cleared when avx isn't available.

No functional change intended.

Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>

+2 -3
+1 -2
net/netfilter/nft_set_pipapo.c
··· 530 530 local_bh_disable(); 531 531 532 532 #if defined(CONFIG_X86_64) && !defined(CONFIG_UML) 533 - if (boot_cpu_has(X86_FEATURE_AVX2) && boot_cpu_has(X86_FEATURE_AVX) && 534 - irq_fpu_usable()) { 533 + if (boot_cpu_has(X86_FEATURE_AVX2) && irq_fpu_usable()) { 535 534 e = pipapo_get_avx2(m, data, genmask, tstamp); 536 535 local_bh_enable(); 537 536 return e;
+1 -1
net/netfilter/nft_set_pipapo_avx2.c
··· 1099 1099 desc->field_count < NFT_PIPAPO_MIN_FIELDS) 1100 1100 return false; 1101 1101 1102 - if (!boot_cpu_has(X86_FEATURE_AVX2) || !boot_cpu_has(X86_FEATURE_AVX)) 1102 + if (!boot_cpu_has(X86_FEATURE_AVX2)) 1103 1103 return false; 1104 1104 1105 1105 est->size = pipapo_estimate_size(desc);