public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] KVM: VMX: Remove unnecessary parentheses
@ 2026-03-05 23:54 Xin Li (Intel)
  2026-03-06  6:17 ` BillXiang
  0 siblings, 1 reply; 3+ messages in thread
From: Xin Li (Intel) @ 2026-03-05 23:54 UTC (permalink / raw)
  To: kvm, linux-kernel
  Cc: seanjc, pbonzini, tglx, mingo, bp, dave.hansen, x86, hpa, xin

From: Xin Li <xin@zytor.com>

Drop redundant parentheses; & takes precedence over &&.

Signed-off-by: Xin Li <xin@zytor.com>
---
 arch/x86/kvm/vmx/capabilities.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kvm/vmx/capabilities.h b/arch/x86/kvm/vmx/capabilities.h
index 4e371c93ae16..0dad9e7c4ff4 100644
--- a/arch/x86/kvm/vmx/capabilities.h
+++ b/arch/x86/kvm/vmx/capabilities.h
@@ -107,7 +107,7 @@ static inline bool cpu_has_load_perf_global_ctrl(void)
 
 static inline bool cpu_has_load_cet_ctrl(void)
 {
-	return (vmcs_config.vmentry_ctrl & VM_ENTRY_LOAD_CET_STATE);
+	return vmcs_config.vmentry_ctrl & VM_ENTRY_LOAD_CET_STATE;
 }
 
 static inline bool cpu_has_save_perf_global_ctrl(void)
@@ -162,7 +162,7 @@ static inline bool cpu_has_vmx_ept(void)
 static inline bool vmx_umip_emulated(void)
 {
 	return !boot_cpu_has(X86_FEATURE_UMIP) &&
-	       (vmcs_config.cpu_based_2nd_exec_ctrl & SECONDARY_EXEC_DESC);
+	       vmcs_config.cpu_based_2nd_exec_ctrl & SECONDARY_EXEC_DESC;
 }
 
 static inline bool cpu_has_vmx_rdtscp(void)
@@ -376,9 +376,9 @@ static inline bool cpu_has_vmx_invvpid_global(void)
 
 static inline bool cpu_has_vmx_intel_pt(void)
 {
-	return (vmcs_config.misc & VMX_MISC_INTEL_PT) &&
-		(vmcs_config.cpu_based_2nd_exec_ctrl & SECONDARY_EXEC_PT_USE_GPA) &&
-		(vmcs_config.vmentry_ctrl & VM_ENTRY_LOAD_IA32_RTIT_CTL);
+	return vmcs_config.misc & VMX_MISC_INTEL_PT &&
+	       vmcs_config.cpu_based_2nd_exec_ctrl & SECONDARY_EXEC_PT_USE_GPA &&
+	       vmcs_config.vmentry_ctrl & VM_ENTRY_LOAD_IA32_RTIT_CTL;
 }
 
 /*

base-commit: 5128b972fb2801ad9aca54d990a75611ab5283a9
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-06 16:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-05 23:54 [PATCH v1] KVM: VMX: Remove unnecessary parentheses Xin Li (Intel)
2026-03-06  6:17 ` BillXiang
2026-03-06 16:24   ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox