@@ -45,7 +45,7 @@ static inline void __set_vrange(struct vrange *range,
range->node.last = end_idx;
}
-void lru_add_vrange(struct vrange *vrange)
+static void lru_add_vrange(struct vrange *vrange)
{
spin_lock(&lru_lock);
WARN_ON(!list_empty(&vrange->lru));
@@ -53,7 +53,7 @@ void lru_add_vrange(struct vrange *vrange)
spin_unlock(&lru_lock);
}
-void lru_remove_vrange(struct vrange *vrange)
+static void lru_remove_vrange(struct vrange *vrange)
{
spin_lock(&lru_lock);
if (!list_empty(&vrange->lru))
@@ -130,7 +130,7 @@ static inline void range_resize(struct rb_root *root,
__add_range(range, root, mm);
}
-int add_vrange(struct mm_struct *mm,
+static int add_vrange(struct mm_struct *mm,
unsigned long start, unsigned long end)
{
struct rb_root *root;
@@ -172,7 +172,7 @@ out:
return 0;
}
-int remove_vrange(struct mm_struct *mm,
+static int remove_vrange(struct mm_struct *mm,
unsigned long start, unsigned long end)
{
struct rb_root *root;
@@ -292,7 +292,7 @@ out:
return ret;
}
-bool __vrange_address(struct mm_struct *mm,
+static bool __vrange_address(struct mm_struct *mm,
unsigned long start, unsigned long end)
{
struct rb_root *root = &mm->v_rb;
@@ -387,7 +387,7 @@ static void __vrange_purge(struct mm_struct *mm,
}
}
-int try_to_discard_one(struct page *page, struct vm_area_struct *vma,
+static int try_to_discard_one(struct page *page, struct vm_area_struct *vma,
unsigned long address)
{
struct mm_struct *mm = vma->vm_mm;
@@ -602,7 +602,7 @@ static int vrange_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
}
-unsigned int discard_vma_pages(struct zone *zone, struct mm_struct *mm,
+static unsigned int discard_vma_pages(struct zone *zone, struct mm_struct *mm,
struct vm_area_struct *vma, unsigned long start,
unsigned long end, unsigned int nr_to_discard)
{
@@ -669,7 +669,7 @@ out:
* Get next victim vrange from LRU and hold a vrange refcount
* and vrange->mm's refcount.
*/
-struct vrange *get_victim_vrange(void)
+static struct vrange *get_victim_vrange(void)
{
struct mm_struct *mm;
struct vrange *vrange = NULL;
@@ -711,7 +711,7 @@ struct vrange *get_victim_vrange(void)
return vrange;
}
-void put_victim_range(struct vrange *vrange)
+static void put_victim_range(struct vrange *vrange)
{
put_vrange(vrange);
mmdrop(vrange->mm);
Make a number of local functions in vrange.c static. Cc: linux-mm@kvack.org Cc: Michael Kerrisk <mtk.manpages@gmail.com> Cc: Arun Sharma <asharma@fb.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Hugh Dickins <hughd@google.com> Cc: Dave Hansen <dave@sr71.net> Cc: Rik van Riel <riel@redhat.com> Cc: Neil Brown <neilb@suse.de> Cc: Mike Hommey <mh@glandium.org> Cc: Taras Glek <tglek@mozilla.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Jason Evans <je@fb.com> Cc: sanjay@google.com Cc: Paul Turner <pjt@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michel Lespinasse <walken@google.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Minchan Kim <minchan@kernel.org> Signed-off-by: John Stultz <john.stultz@linaro.org> --- mm/vrange.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)