[PATCH][next] KVM: x86: simplify zero'ing of entry->ebx

From: Colin King
Date: Thu Apr 22 2021 - 10:12:06 EST


From: Colin Ian King <colin.king@xxxxxxxxxxxxx>

Currently entry->ebx is being zero'd by masking itself with zero.
Simplify this by just assigning zero, cleans up static analysis
warning.

Addresses-Coverity: ("Bitwise-and with zero")
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
---
arch/x86/kvm/cpuid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 57744a5d1bc2..9bcc2ff4b232 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -851,7 +851,7 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function)
entry->eax &= SGX_ATTR_DEBUG | SGX_ATTR_MODE64BIT |
SGX_ATTR_PROVISIONKEY | SGX_ATTR_EINITTOKENKEY |
SGX_ATTR_KSS;
- entry->ebx &= 0;
+ entry->ebx = 0;
break;
/* Intel PT */
case 0x14:
--
2.30.2