Re: [PATCH] MIPS: VZ: Only include loongson_regs.h for CPU_LOONGSON64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 08, 2020 at 08:50:52PM +0800, Huacai Chen wrote:
> Only Loongson64 platform has and needs loongson_regs.h, including it
> unconditionally will cause build errors.
> 
> Fixes: 7f2a83f1c2a941ebfee5 ("KVM: MIPS: Add CPUCFG emulation for Loongson-3")
> Cc: stable@xxxxxxxxxxxxxxx
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Signed-off-by: Huacai Chen <chenhc@xxxxxxxxxx>
> ---
>  arch/mips/kvm/vz.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/mips/kvm/vz.c b/arch/mips/kvm/vz.c
> index 3932f76..a474578 100644
> --- a/arch/mips/kvm/vz.c
> +++ b/arch/mips/kvm/vz.c
> @@ -29,7 +29,9 @@
>  #include <linux/kvm_host.h>
>  
>  #include "interrupt.h"
> +#ifdef CONFIG_CPU_LOONGSON64
>  #include "loongson_regs.h"
> +#endif

The fix for this should be in the .h file, no #ifdef should be needed in
a .c file.

thanks,

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux