kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86: kvm: vmx: Remove some unused functions
@ 2015-01-11 18:02 Rickard Strandqvist
  2015-01-12 10:12 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Rickard Strandqvist @ 2015-01-11 18:02 UTC (permalink / raw)
  To: Gleb Natapov, Paolo Bonzini
  Cc: Rickard Strandqvist, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, kvm, linux-kernel

Removes some functions that are not used anywhere:
cpu_has_vmx_eptp_writeback() cpu_has_vmx_eptp_uncacheable()

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 arch/x86/kvm/vmx.c |   10 ----------
 1 file changed, 10 deletions(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 3e556c6..e273f15 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -951,16 +951,6 @@ static inline bool cpu_has_vmx_ept_execute_only(void)
 	return vmx_capability.ept & VMX_EPT_EXECUTE_ONLY_BIT;
 }
 
-static inline bool cpu_has_vmx_eptp_uncacheable(void)
-{
-	return vmx_capability.ept & VMX_EPTP_UC_BIT;
-}
-
-static inline bool cpu_has_vmx_eptp_writeback(void)
-{
-	return vmx_capability.ept & VMX_EPTP_WB_BIT;
-}
-
 static inline bool cpu_has_vmx_ept_2m_page(void)
 {
 	return vmx_capability.ept & VMX_EPT_2MB_PAGE_BIT;
-- 
1.7.10.4

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

* Re: [PATCH] x86: kvm: vmx: Remove some unused functions
  2015-01-11 18:02 [PATCH] x86: kvm: vmx: Remove some unused functions Rickard Strandqvist
@ 2015-01-12 10:12 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2015-01-12 10:12 UTC (permalink / raw)
  To: Rickard Strandqvist, Gleb Natapov
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, kvm,
	linux-kernel

On 11/01/2015 19:02, Rickard Strandqvist wrote:
> Removes some functions that are not used anywhere:
> cpu_has_vmx_eptp_writeback() cpu_has_vmx_eptp_uncacheable()
> 
> This was partially found by using a static code analysis program called cppcheck.
> 
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
>  arch/x86/kvm/vmx.c |   10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 3e556c6..e273f15 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -951,16 +951,6 @@ static inline bool cpu_has_vmx_ept_execute_only(void)
>  	return vmx_capability.ept & VMX_EPT_EXECUTE_ONLY_BIT;
>  }
>  
> -static inline bool cpu_has_vmx_eptp_uncacheable(void)
> -{
> -	return vmx_capability.ept & VMX_EPTP_UC_BIT;
> -}
> -
> -static inline bool cpu_has_vmx_eptp_writeback(void)
> -{
> -	return vmx_capability.ept & VMX_EPTP_WB_BIT;
> -}
> -
>  static inline bool cpu_has_vmx_ept_2m_page(void)
>  {
>  	return vmx_capability.ept & VMX_EPT_2MB_PAGE_BIT;
> 

Looks good, thanks.

Paolo

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

end of thread, other threads:[~2015-01-12 10:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-11 18:02 [PATCH] x86: kvm: vmx: Remove some unused functions Rickard Strandqvist
2015-01-12 10:12 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).