kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/kvm/vmx: fix old-style function declaration
@ 2018-11-08  3:22 Yi Wang
  2018-11-25 17:35 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Yi Wang @ 2018-11-08  3:22 UTC (permalink / raw)
  To: pbonzini
  Cc: rkrcmar, tglx, mingo, bp, hpa, x86, kvm, linux-kernel,
	zhong.weidong, Yi Wang

The inline keyword which is not at the beginning of the function
declaration may trigger the following build warnings, so let's fix it:

arch/x86/kvm/vmx.c:1309:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
arch/x86/kvm/vmx.c:5947:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
arch/x86/kvm/vmx.c:5985:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
arch/x86/kvm/vmx.c:6023:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]

Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
---
 arch/x86/kvm/vmx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 4555077..cd8355b 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1306,7 +1306,7 @@ static void vmx_get_segment(struct kvm_vcpu *vcpu,
 static bool nested_vmx_is_page_fault_vmexit(struct vmcs12 *vmcs12,
 					    u16 error_code);
 static void vmx_update_msr_bitmap(struct kvm_vcpu *vcpu);
-static void __always_inline vmx_disable_intercept_for_msr(unsigned long *msr_bitmap,
+static __always_inline void vmx_disable_intercept_for_msr(unsigned long *msr_bitmap,
 							  u32 msr, int type);
 
 static DEFINE_PER_CPU(struct vmcs *, vmxarea);
@@ -5944,7 +5944,7 @@ static void free_vpid(int vpid)
 	spin_unlock(&vmx_vpid_lock);
 }
 
-static void __always_inline vmx_disable_intercept_for_msr(unsigned long *msr_bitmap,
+static __always_inline void vmx_disable_intercept_for_msr(unsigned long *msr_bitmap,
 							  u32 msr, int type)
 {
 	int f = sizeof(unsigned long);
@@ -5982,7 +5982,7 @@ static void __always_inline vmx_disable_intercept_for_msr(unsigned long *msr_bit
 	}
 }
 
-static void __always_inline vmx_enable_intercept_for_msr(unsigned long *msr_bitmap,
+static __always_inline void vmx_enable_intercept_for_msr(unsigned long *msr_bitmap,
 							 u32 msr, int type)
 {
 	int f = sizeof(unsigned long);
@@ -6020,7 +6020,7 @@ static void __always_inline vmx_enable_intercept_for_msr(unsigned long *msr_bitm
 	}
 }
 
-static void __always_inline vmx_set_intercept_for_msr(unsigned long *msr_bitmap,
+static __always_inline void vmx_set_intercept_for_msr(unsigned long *msr_bitmap,
 			     			      u32 msr, int type, bool value)
 {
 	if (value)
-- 
1.8.3.1

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

* Re: [PATCH] x86/kvm/vmx: fix old-style function declaration
  2018-11-08  3:22 [PATCH] x86/kvm/vmx: fix old-style function declaration Yi Wang
@ 2018-11-25 17:35 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2018-11-25 17:35 UTC (permalink / raw)
  To: Yi Wang
  Cc: rkrcmar, tglx, mingo, bp, hpa, x86, kvm, linux-kernel, zhong.weidong

On 08/11/18 04:22, Yi Wang wrote:
> The inline keyword which is not at the beginning of the function
> declaration may trigger the following build warnings, so let's fix it:
> 
> arch/x86/kvm/vmx.c:1309:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
> arch/x86/kvm/vmx.c:5947:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
> arch/x86/kvm/vmx.c:5985:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
> arch/x86/kvm/vmx.c:6023:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
> 
> Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
> ---
>  arch/x86/kvm/vmx.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 4555077..cd8355b 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -1306,7 +1306,7 @@ static void vmx_get_segment(struct kvm_vcpu *vcpu,
>  static bool nested_vmx_is_page_fault_vmexit(struct vmcs12 *vmcs12,
>  					    u16 error_code);
>  static void vmx_update_msr_bitmap(struct kvm_vcpu *vcpu);
> -static void __always_inline vmx_disable_intercept_for_msr(unsigned long *msr_bitmap,
> +static __always_inline void vmx_disable_intercept_for_msr(unsigned long *msr_bitmap,
>  							  u32 msr, int type);
>  
>  static DEFINE_PER_CPU(struct vmcs *, vmxarea);
> @@ -5944,7 +5944,7 @@ static void free_vpid(int vpid)
>  	spin_unlock(&vmx_vpid_lock);
>  }
>  
> -static void __always_inline vmx_disable_intercept_for_msr(unsigned long *msr_bitmap,
> +static __always_inline void vmx_disable_intercept_for_msr(unsigned long *msr_bitmap,
>  							  u32 msr, int type)
>  {
>  	int f = sizeof(unsigned long);
> @@ -5982,7 +5982,7 @@ static void __always_inline vmx_disable_intercept_for_msr(unsigned long *msr_bit
>  	}
>  }
>  
> -static void __always_inline vmx_enable_intercept_for_msr(unsigned long *msr_bitmap,
> +static __always_inline void vmx_enable_intercept_for_msr(unsigned long *msr_bitmap,
>  							 u32 msr, int type)
>  {
>  	int f = sizeof(unsigned long);
> @@ -6020,7 +6020,7 @@ static void __always_inline vmx_enable_intercept_for_msr(unsigned long *msr_bitm
>  	}
>  }
>  
> -static void __always_inline vmx_set_intercept_for_msr(unsigned long *msr_bitmap,
> +static __always_inline void vmx_set_intercept_for_msr(unsigned long *msr_bitmap,
>  			     			      u32 msr, int type, bool value)
>  {
>  	if (value)
> 

Queued, thanks.

Paolo

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

end of thread, other threads:[~2018-11-25 17:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-08  3:22 [PATCH] x86/kvm/vmx: fix old-style function declaration Yi Wang
2018-11-25 17:35 ` 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).