KVM Archive on lore.kernel.org
 help / color / Atom feed
* [kvm-unit-tests PATCH] x86: fix syntax error
@ 2019-06-13 15:06 Naresh Kamboju
  2019-06-17 19:39 ` Nadav Amit
  0 siblings, 1 reply; 3+ messages in thread
From: Naresh Kamboju @ 2019-06-13 15:06 UTC (permalink / raw)
  To: pbonzini, kvm; +Cc: lkft-triage, Naresh Kamboju

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));
           ~                                 ^
                                             )

Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
---
 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)));
 }
 
 #endif
-- 
2.18.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [kvm-unit-tests PATCH] x86: fix syntax error
  2019-06-13 15:06 [kvm-unit-tests PATCH] x86: fix syntax error Naresh Kamboju
@ 2019-06-17 19:39 ` Nadav Amit
  2019-06-18  1:56   ` Naresh Kamboju
  0 siblings, 1 reply; 3+ messages in thread
From: Nadav Amit @ 2019-06-17 19:39 UTC (permalink / raw)
  To: Naresh Kamboju
  Cc: Paolo Bonzini, kvm list, lkft-triage, Krish Sadhukhan, karl.heubaum

> On Jun 13, 2019, at 8:06 AM, Naresh Kamboju <naresh.kamboju@linaro.org> 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@oracle.com>
Cc: Karl Heubaum <karl.heubaum@oracle.com>


> Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> ---
> 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?



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [kvm-unit-tests PATCH] x86: fix syntax error
  2019-06-17 19:39 ` Nadav Amit
@ 2019-06-18  1:56   ` Naresh Kamboju
  0 siblings, 0 replies; 3+ messages in thread
From: Naresh Kamboju @ 2019-06-18  1:56 UTC (permalink / raw)
  To: Nadav Amit
  Cc: Paolo Bonzini, kvm list, lkft-triage, Krish Sadhukhan, karl.heubaum

On Tue, 18 Jun 2019 at 01:09, Nadav Amit <nadav.amit@gmail.com> wrote:
>
> > On Jun 13, 2019, at 8:06 AM, Naresh Kamboju <naresh.kamboju@linaro.org> 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@oracle.com>
> Cc: Karl Heubaum <karl.heubaum@oracle.com>
>
>
> > Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> > ---
> > 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


>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-13 15:06 [kvm-unit-tests PATCH] x86: fix syntax error Naresh Kamboju
2019-06-17 19:39 ` Nadav Amit
2019-06-18  1:56   ` Naresh Kamboju

KVM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kvm/0 kvm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kvm kvm/ https://lore.kernel.org/kvm \
		kvm@vger.kernel.org kvm@archiver.kernel.org
	public-inbox-index kvm


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.kvm


AGPL code for this site: git clone https://public-inbox.org/ public-inbox