Skip to contentSkip to conversation

mm/memory_hotplug: remove an unused variable in move_pfn_range_to_zone()

PATCH In review Wei Yang 3 participants 3 messages Jun 26, 2017 – Jun 27, 2017

Subsystems (2)
lore
Share & tools
lore

Wei Yang

author
#0 lore raw

PATCH 1/1 mm/memory_hotplug: remove an unused variable in move_pfn_range_to_zone()

There is an unused variable in move_pfn_range_to_zone().

This patch just removes it.

---
 mm/memory_hotplug.c | 1 -
 1 file changed, 1 deletion(-)
mm/memory_hotplug.c +0 -1
index 514014dde16b..16167c92bbf1 100644
@@ -899,7 +899,6 @@ void __ref move_pfn_range_to_zone(struct zone *zone,
 	struct pglist_data *pgdat = zone->zone_pgdat;
 	int nid = pgdat->node_id;
 	unsigned long flags;
-	unsigned long i;
 
 	if (zone_is_empty(zone))
 		init_currently_empty_zone(zone, start_pfn, nr_pages);
Signature · 7 lines
2.11.0

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#1 lore raw
Quoted 14 lines · Wei Yang

There is an unused variable in move_pfn_range_to_zone().

This patch just removes it.

---
 mm/memory_hotplug.c | 1 -
 1 file changed, 1 deletion(-)
mm/memory_hotplug.c +0 -0
index 514014dde16b..16167c92bbf1 100644

mm/memory_hotplug.c void __ref move_pfn_range_to_zone(struct zone *zone, · line 904

Quoted 7 lines
mm/memory_hotplug.c +0 -1
@@ -899,7 +899,6 @@ void __ref move_pfn_range_to_zone(struct zone *zone,
 	struct pglist_data *pgdat = zone->zone_pgdat;
 	int nid = pgdat->node_id;
 	unsigned long flags;
-	unsigned long i;
 
 	if (zone_is_empty(zone))
 		init_currently_empty_zone(zone, start_pfn, nr_pages);

We have this down in the function. IIRC I had checked out tag mmotm-2017-06-16-13-59 where I am looking out for this function.

for (i = 0; i < nr_pages; i++) {
	unsigned long pfn = start_pfn + i;
	set_page_links(pfn_to_page(pfn), zone_idx(zone), nid, pfn);
}

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#2 lore raw
Quoted 20 lines · Anshuman Khandual
Quoted 19 lines · Wei Yang

There is an unused variable in move_pfn_range_to_zone().

This patch just removes it.

---
 mm/memory_hotplug.c | 1 -
 1 file changed, 1 deletion(-)
mm/memory_hotplug.c +0 -1
index 514014dde16b..16167c92bbf1 100644
@@ -899,7 +899,6 @@ void __ref move_pfn_range_to_zone(struct zone *zone,
 	struct pglist_data *pgdat = zone->zone_pgdat;
 	int nid = pgdat->node_id;
 	unsigned long flags;
-	unsigned long i;
 
Quoted 5 lines

mm/memory_hotplug.c void __ref move_pfn_range_to_zone(struct zone *zone, · line 904

Quoted 2 lines
mm/memory_hotplug.c +0 -0
 	if (zone_is_empty(zone))
 		init_currently_empty_zone(zone, start_pfn, nr_pages);

We have this down in the function. IIRC I had checked out tag mmotm-2017-06-16-13-59 where I am looking out for this function.

It's a follow up for mm-memory_hotplug-do-not-associate-hotadded-memory-to-zones-until-online-fix-2.patch in mmotm-2017-06-23-15-03

Quoted 7 lines
for (i = 0; i < nr_pages; i++) {
	unsigned long pfn = start_pfn + i;
	set_page_links(pfn_to_page(pfn), zone_idx(zone), nid, pfn);
}
Signature · 8 lines
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>