Skip to content

Commit

Permalink
fs/proc/kcore.c: make get_sparsemem_vmemmap_info() static
Browse files Browse the repository at this point in the history
get_sparsemem_vmemmap_info() is only used inside fs/proc/kcore.c

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Djalal Harouni authored and Linus Torvalds committed Mar 23, 2012
1 parent accb61f commit b908243
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/proc/kcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ static int kcore_update_ram(void)

#ifdef CONFIG_SPARSEMEM_VMEMMAP
/* calculate vmemmap's address from given system ram pfn and register it */
int get_sparsemem_vmemmap_info(struct kcore_list *ent, struct list_head *head)
static int
get_sparsemem_vmemmap_info(struct kcore_list *ent, struct list_head *head)
{
unsigned long pfn = __pa(ent->addr) >> PAGE_SHIFT;
unsigned long nr_pages = ent->size >> PAGE_SHIFT;
Expand Down Expand Up @@ -189,7 +190,8 @@ int get_sparsemem_vmemmap_info(struct kcore_list *ent, struct list_head *head)

}
#else
int get_sparsemem_vmemmap_info(struct kcore_list *ent, struct list_head *head)
static int
get_sparsemem_vmemmap_info(struct kcore_list *ent, struct list_head *head)
{
return 1;
}
Expand Down

0 comments on commit b908243

Please sign in to comment.