KVM: x86: Remove unnecessary export of kvm_cpu_has_pending_timer()

Message ID 20221110010354.1342128-1-seanjc@google.com
State New
Headers
Series KVM: x86: Remove unnecessary export of kvm_cpu_has_pending_timer() |

Commit Message

Sean Christopherson Nov. 10, 2022, 1:03 a.m. UTC
  Don't export x86's kvm_cpu_has_pending_timer(), the helper isn't used by
KVM x86's vendor modules.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
---
 arch/x86/kvm/irq.c | 1 -
 1 file changed, 1 deletion(-)


base-commit: d663b8a285986072428a6a145e5994bc275df994
  

Comments

Like Xu Nov. 14, 2022, 6:50 a.m. UTC | #1
On 10/11/2022 9:03 am, Sean Christopherson wrote:
> Don't export x86's kvm_cpu_has_pending_timer(), the helper isn't used by
> KVM x86's vendor modules.
> 
> No functional change intended.

The callers of EXPORT_SYMBOL (considering that this line of code has been around
for a long time) will not be public like the callers of EXPORT_SYMBOL_GPL.

Whether we close this door in the future or not, this description is inappropriate.

> 
> Signed-off-by: Sean Christopherson <seanjc@google.com>
> ---
>   arch/x86/kvm/irq.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/irq.c b/arch/x86/kvm/irq.c
> index d8d50558f165..04a009fbdf8a 100644
> --- a/arch/x86/kvm/irq.c
> +++ b/arch/x86/kvm/irq.c
> @@ -31,7 +31,6 @@ int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu)
>   
>   	return r;
>   }
> -EXPORT_SYMBOL(kvm_cpu_has_pending_timer);

Not sure if the kernel's symbol or kbuild sub-system has tools to
automatically warn or turn off similar interface exposures.

>   
>   /*
>    * check if there is a pending userspace external interrupt
> 
> base-commit: d663b8a285986072428a6a145e5994bc275df994
  

Patch

diff --git a/arch/x86/kvm/irq.c b/arch/x86/kvm/irq.c
index d8d50558f165..04a009fbdf8a 100644
--- a/arch/x86/kvm/irq.c
+++ b/arch/x86/kvm/irq.c
@@ -31,7 +31,6 @@  int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu)
 
 	return r;
 }
-EXPORT_SYMBOL(kvm_cpu_has_pending_timer);
 
 /*
  * check if there is a pending userspace external interrupt