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 Sun, Aug 09, 2020 at 07:23:28PM +0200, Paolo Bonzini wrote:
> On 09/08/20 09:02, Greg KH wrote:
> >>>> 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.
> >> The header file can only be reached when CONFIG_CPU_LOONGSON64 is
> >> selected...
> >> Otherwise the include path of this file won't be a part of CFLAGS.
> > That sounds like you should fix up the path of this file in the
> > #include line as well :)
> > 
> 
> There is more #ifdef CONFIG_CPU_LOONGSON64 in arch/mips/kvm/vz.c, and
> more #include "loongson_regs.h" in arch/mips.  So while I agree with
> Greg that this idiom is quite unusual, it seems to be the expected way
> to use this header.  I queued the patch.

Or you all could fix it up to work properly like all other #include
lines in the kernel source tree.  There's no reason mips should be
"special" here, right?

thanks,

greg k-h



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux