Skip to contentSkip to conversation

x86/virt/tdx: Remove duplicated include in tdx.c

PATCH In review Yang Li 4 participants 4 messages Dec 12, 2023

Subsystems (2)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 x86/virt/tdx: Remove duplicated include in tdx.c

The header files linux/acpi.h and asm/cpufeature.h are both included twice in C, so one inclusion of each can be removed.

---
 arch/x86/virt/vmx/tdx/tdx.c | 2 --
 1 file changed, 2 deletions(-)
arch/x86/virt/vmx/tdx/tdx.c +0 -2
index 13df68ef40b5..49a1c6890b55 100644
@@ -27,14 +27,12 @@
 #include <linux/log2.h>
 #include <linux/acpi.h>
 #include <linux/suspend.h>
-#include <linux/acpi.h>
 #include <asm/page.h>
 #include <asm/special_insns.h>
 #include <asm/msr-index.h>
 #include <asm/msr.h>
 #include <asm/cpufeature.h>
 #include <asm/tdx.h>
-#include <asm/cpufeature.h>
 #include <asm/intel-family.h>
 #include <asm/processor.h>
 #include <asm/mce.h>
Signature · 1 line
2.20.1.7.g153144c
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Yang Li

The header files linux/acpi.h and asm/cpufeature.h are both included twice in C, so one inclusion of each can be removed.

Quoted 23 lines
---
 arch/x86/virt/vmx/tdx/tdx.c | 2 --
 1 file changed, 2 deletions(-)
arch/x86/virt/vmx/tdx/tdx.c +0 -2
index 13df68ef40b5..49a1c6890b55 100644
@@ -27,14 +27,12 @@
 #include <linux/log2.h>
 #include <linux/acpi.h>
 #include <linux/suspend.h>
-#include <linux/acpi.h>
 #include <asm/page.h>
 #include <asm/special_insns.h>
 #include <asm/msr-index.h>
 #include <asm/msr.h>
 #include <asm/cpufeature.h>
 #include <asm/tdx.h>
-#include <asm/cpufeature.h>
 #include <asm/intel-family.h>
 #include <asm/processor.h>
 #include <asm/mce.h>
#3 lore raw
In reply to Yang Li
Quoted 2 lines · Yang Li

The header files linux/acpi.h and asm/cpufeature.h are both included twice in C, so one inclusion of each can be removed.

Thanks for the report. I've just squashed this back into the culprit patch.