lkml.org 
[lkml]   [2011]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 10/10] KVM: cleanup memslot_id function
On 03/04/2011 01:02 PM, Xiao Guangrong wrote:
> We can get memslot id from memslot->id directly
>
>
> @@ -388,6 +387,12 @@ int kvm_gfn_to_hva_cache_init(struct kvm *kvm, struct gfn_to_hva_cache *ghc,
> int kvm_clear_guest_page(struct kvm *kvm, gfn_t gfn, int offset, int len);
> int kvm_clear_guest(struct kvm *kvm, gpa_t gpa, unsigned long len);
> struct kvm_memory_slot *gfn_to_memslot(struct kvm *kvm, gfn_t gfn);
> +
> +static inline int memslot_id(struct kvm *kvm, gfn_t gfn)
> +{
> + return gfn_to_memslot(kvm, gfn)->id;
> +}
> +
> int kvm_is_visible_gfn(struct kvm *kvm, gfn_t gfn);
> unsigned long kvm_host_page_size(struct kvm *kvm, gfn_t gfn);
> void mark_page_dirty(struct kvm *kvm, gfn_t gfn);

Please put the function near the other inlines.

--
error compiling committee.c: too many arguments to function



\
 
 \ /
  Last update: 2011-03-06 13:35    [W:0.027 / U:0.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site