Skip to content

Commit

Permalink
meminit section warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Al Viro authored and Linus Torvalds committed Nov 30, 2008
1 parent ed31348 commit 3116848
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions include/linux/page_cgroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct page_cgroup {
struct list_head lru; /* per cgroup LRU list */
};

void __init pgdat_page_cgroup_init(struct pglist_data *pgdat);
void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat);
void __init page_cgroup_init(void);
struct page_cgroup *lookup_page_cgroup(struct page *page);

Expand Down Expand Up @@ -91,7 +91,7 @@ static inline void unlock_page_cgroup(struct page_cgroup *pc)
#else /* CONFIG_CGROUP_MEM_RES_CTLR */
struct page_cgroup;

static inline void pgdat_page_cgroup_init(struct pglist_data *pgdat)
static inline void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
{
}

Expand Down
9 changes: 5 additions & 4 deletions mm/memory_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static void grow_pgdat_span(struct pglist_data *pgdat, unsigned long start_pfn,
pgdat->node_start_pfn;
}

static int __add_zone(struct zone *zone, unsigned long phys_start_pfn)
static int __meminit __add_zone(struct zone *zone, unsigned long phys_start_pfn)
{
struct pglist_data *pgdat = zone->zone_pgdat;
int nr_pages = PAGES_PER_SECTION;
Expand All @@ -216,7 +216,7 @@ static int __add_zone(struct zone *zone, unsigned long phys_start_pfn)
return 0;
}

static int __add_section(struct zone *zone, unsigned long phys_start_pfn)
static int __meminit __add_section(struct zone *zone, unsigned long phys_start_pfn)
{
int nr_pages = PAGES_PER_SECTION;
int ret;
Expand Down Expand Up @@ -273,7 +273,7 @@ static int __remove_section(struct zone *zone, struct mem_section *ms)
* call this function after deciding the zone to which to
* add the new pages.
*/
int __add_pages(struct zone *zone, unsigned long phys_start_pfn,
int __ref __add_pages(struct zone *zone, unsigned long phys_start_pfn,
unsigned long nr_pages)
{
unsigned long i;
Expand Down Expand Up @@ -470,7 +470,8 @@ static void rollback_node_hotadd(int nid, pg_data_t *pgdat)
}


int add_memory(int nid, u64 start, u64 size)
/* we are OK calling __meminit stuff here - we have CONFIG_MEMORY_HOTPLUG */
int __ref add_memory(int nid, u64 start, u64 size)
{
pg_data_t *pgdat = NULL;
int new_pgdat = 0;
Expand Down
13 changes: 7 additions & 6 deletions mm/page_cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ static unsigned long total_usage;
#if !defined(CONFIG_SPARSEMEM)


void __init pgdat_page_cgroup_init(struct pglist_data *pgdat)
void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
{
pgdat->node_page_cgroup = NULL;
}
Expand Down Expand Up @@ -97,7 +97,8 @@ struct page_cgroup *lookup_page_cgroup(struct page *page)
return section->page_cgroup + pfn;
}

int __meminit init_section_page_cgroup(unsigned long pfn)
/* __alloc_bootmem...() is protected by !slab_available() */
int __init_refok init_section_page_cgroup(unsigned long pfn)
{
struct mem_section *section;
struct page_cgroup *base, *pc;
Expand Down Expand Up @@ -158,7 +159,7 @@ void __free_page_cgroup(unsigned long pfn)
}
}

int online_page_cgroup(unsigned long start_pfn,
int __meminit online_page_cgroup(unsigned long start_pfn,
unsigned long nr_pages,
int nid)
{
Expand All @@ -183,7 +184,7 @@ int online_page_cgroup(unsigned long start_pfn,
return -ENOMEM;
}

int offline_page_cgroup(unsigned long start_pfn,
int __meminit offline_page_cgroup(unsigned long start_pfn,
unsigned long nr_pages, int nid)
{
unsigned long start, end, pfn;
Expand All @@ -197,7 +198,7 @@ int offline_page_cgroup(unsigned long start_pfn,

}

static int page_cgroup_callback(struct notifier_block *self,
static int __meminit page_cgroup_callback(struct notifier_block *self,
unsigned long action, void *arg)
{
struct memory_notify *mn = arg;
Expand Down Expand Up @@ -248,7 +249,7 @@ void __init page_cgroup_init(void)
" want\n");
}

void __init pgdat_page_cgroup_init(struct pglist_data *pgdat)
void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion mm/sparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ static void free_section_usemap(struct page *memmap, unsigned long *usemap)
* set. If this is <=0, then that means that the passed-in
* map was not consumed and must be freed.
*/
int sparse_add_one_section(struct zone *zone, unsigned long start_pfn,
int __meminit sparse_add_one_section(struct zone *zone, unsigned long start_pfn,
int nr_pages)
{
unsigned long section_nr = pfn_to_section_nr(start_pfn);
Expand Down

0 comments on commit 3116848

Please sign in to comment.