Re: [kvm-unit-tests PATCH] x86: fix syntax error

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

 



On Tue, 18 Jun 2019 at 01:09, Nadav Amit <nadav.amit@xxxxxxxxx> wrote:
>
> > On Jun 13, 2019, at 8:06 AM, Naresh Kamboju <naresh.kamboju@xxxxxxxxxx> wrote:
> >
> > This patch fixes this build error,
> > kvm-unit-tests/lib/x86/processor.h:497:45: error: expected ‘)’ before ‘;’ token
> >  return !!((cpuid(0x80000001).d & (1 << 20));
> >           ~                                 ^
> >
>
> Fixes: ddbb68a60534b ("kvm-unit-test: x86: Add a wrapper to check if the CPU supports NX bit in MSR_EFER")
> Cc: Krish Sadhukhan <krish.sadhukhan@xxxxxxxxxx>
> Cc: Karl Heubaum <karl.heubaum@xxxxxxxxxx>
>
>
> > Signed-off-by: Naresh Kamboju <naresh.kamboju@xxxxxxxxxx>
> > ---
> > lib/x86/processor.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lib/x86/processor.h b/lib/x86/processor.h
> > index 0a65808..823d65d 100644
> > --- a/lib/x86/processor.h
> > +++ b/lib/x86/processor.h
> > @@ -494,7 +494,7 @@ static inline int has_spec_ctrl(void)
> >
> > static inline int cpu_has_efer_nx(void)
> > {
> > -     return !!((cpuid(0x80000001).d & (1 << 20));
> > +     return !!((cpuid(0x80000001).d & (1 << 20)));
>
> Just because I also encountered this issue: why would you add another
> bracket instead of removing one?

I see two !! and thought that we might need ((
Sorry if that does not make sense.

- Naresh


>
>




[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