diff options
author | Geoff Levand <geoff@infradead.org> | 2013-04-05 15:20:30 -0400 |
---|---|---|
committer | Gleb Natapov <gleb@redhat.com> | 2013-04-08 06:02:04 -0400 |
commit | 39369f7a8b7314b8f7860c880a2198c11cebdf5a (patch) | |
tree | c0eed7068022d51c1f7f14ab4706b5fff0563b6c /virt/kvm | |
parent | fc1b74925f87f6aca5432eb73f6a57eff30afde7 (diff) |
KVM: Make local routines static
The routines get_user_page_nowait(), kvm_io_bus_sort_cmp(), kvm_io_bus_insert_dev()
and kvm_io_bus_get_first_dev() are only referenced within kvm_main.c, so give them
static linkage.
Fixes sparse warnings like these:
virt/kvm/kvm_main.c: warning: symbol 'get_user_page_nowait' was not declared. Should it be static?
Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'virt/kvm')
-rw-r--r-- | virt/kvm/kvm_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index ff7154188b5f..9ad98769dd75 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -1078,7 +1078,7 @@ static int kvm_read_hva_atomic(void *data, void __user *hva, int len) | |||
1078 | return __copy_from_user_inatomic(data, hva, len); | 1078 | return __copy_from_user_inatomic(data, hva, len); |
1079 | } | 1079 | } |
1080 | 1080 | ||
1081 | int get_user_page_nowait(struct task_struct *tsk, struct mm_struct *mm, | 1081 | static int get_user_page_nowait(struct task_struct *tsk, struct mm_struct *mm, |
1082 | unsigned long start, int write, struct page **page) | 1082 | unsigned long start, int write, struct page **page) |
1083 | { | 1083 | { |
1084 | int flags = FOLL_TOUCH | FOLL_NOWAIT | FOLL_HWPOISON | FOLL_GET; | 1084 | int flags = FOLL_TOUCH | FOLL_NOWAIT | FOLL_HWPOISON | FOLL_GET; |
@@ -2612,7 +2612,7 @@ static void kvm_io_bus_destroy(struct kvm_io_bus *bus) | |||
2612 | kfree(bus); | 2612 | kfree(bus); |
2613 | } | 2613 | } |
2614 | 2614 | ||
2615 | int kvm_io_bus_sort_cmp(const void *p1, const void *p2) | 2615 | static int kvm_io_bus_sort_cmp(const void *p1, const void *p2) |
2616 | { | 2616 | { |
2617 | const struct kvm_io_range *r1 = p1; | 2617 | const struct kvm_io_range *r1 = p1; |
2618 | const struct kvm_io_range *r2 = p2; | 2618 | const struct kvm_io_range *r2 = p2; |
@@ -2624,7 +2624,7 @@ int kvm_io_bus_sort_cmp(const void *p1, const void *p2) | |||
2624 | return 0; | 2624 | return 0; |
2625 | } | 2625 | } |
2626 | 2626 | ||
2627 | int kvm_io_bus_insert_dev(struct kvm_io_bus *bus, struct kvm_io_device *dev, | 2627 | static int kvm_io_bus_insert_dev(struct kvm_io_bus *bus, struct kvm_io_device *dev, |
2628 | gpa_t addr, int len) | 2628 | gpa_t addr, int len) |
2629 | { | 2629 | { |
2630 | bus->range[bus->dev_count++] = (struct kvm_io_range) { | 2630 | bus->range[bus->dev_count++] = (struct kvm_io_range) { |
@@ -2639,7 +2639,7 @@ int kvm_io_bus_insert_dev(struct kvm_io_bus *bus, struct kvm_io_device *dev, | |||
2639 | return 0; | 2639 | return 0; |
2640 | } | 2640 | } |
2641 | 2641 | ||
2642 | int kvm_io_bus_get_first_dev(struct kvm_io_bus *bus, | 2642 | static int kvm_io_bus_get_first_dev(struct kvm_io_bus *bus, |
2643 | gpa_t addr, int len) | 2643 | gpa_t addr, int len) |
2644 | { | 2644 | { |
2645 | struct kvm_io_range *range, key; | 2645 | struct kvm_io_range *range, key; |