[-next] x86/virt/tdx: Remove duplicated include in tdx.c

Message ID 20231212003825.70297-1-yang.lee@linux.alibaba.com
State New
Headers
Series [-next] x86/virt/tdx: Remove duplicated include in tdx.c |

Commit Message

Yang Li Dec. 12, 2023, 12:38 a.m. UTC
  The header files linux/acpi.h and asm/cpufeature.h are both
included twice in C, so one inclusion of each can be removed.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7713
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 arch/x86/virt/vmx/tdx/tdx.c | 2 --
 1 file changed, 2 deletions(-)
  

Comments

Kai Huang Dec. 12, 2023, 1:05 a.m. UTC | #1
On Tue, 2023-12-12 at 08:38 +0800, Yang Li wrote:
> The header files linux/acpi.h and asm/cpufeature.h are both
> included twice in C, so one inclusion of each can be removed.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7713
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>

Reviewed-by: Kai Huang <kai.huang@intel.com>

> ---
>  arch/x86/virt/vmx/tdx/tdx.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/x86/virt/vmx/tdx/tdx.c b/arch/x86/virt/vmx/tdx/tdx.c
> index 13df68ef40b5..49a1c6890b55 100644
> --- a/arch/x86/virt/vmx/tdx/tdx.c
> +++ b/arch/x86/virt/vmx/tdx/tdx.c
> @@ -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>
  
Kirill A. Shutemov Dec. 12, 2023, 10:33 a.m. UTC | #2
On Tue, Dec 12, 2023 at 08:38:25AM +0800, Yang Li wrote:
> The header files linux/acpi.h and asm/cpufeature.h are both
> included twice in C, so one inclusion of each can be removed.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7713
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>

Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
  
Dave Hansen Dec. 12, 2023, 6:59 p.m. UTC | #3
On 12/11/23 16:38, Yang Li wrote:
> 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.
  

Patch

diff --git a/arch/x86/virt/vmx/tdx/tdx.c b/arch/x86/virt/vmx/tdx/tdx.c
index 13df68ef40b5..49a1c6890b55 100644
--- a/arch/x86/virt/vmx/tdx/tdx.c
+++ b/arch/x86/virt/vmx/tdx/tdx.c
@@ -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>