Skip to contentSkip to conversation

page_alloc: Remove argument to find_zone_movable_pfns_for_nodes

PATCH In review Kautuk Consul 2 participants 4 messages Mar 13, 2012 – Mar 14, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 page_alloc: Remove argument to find_zone_movable_pfns_for_nodes

The find_zone_movable_pfns_for_nodes() function does not utiilize the argument to it.

Removing this argument from the function prototype as well as its caller, i.e. free_area_init_nodes().

---
 mm/page_alloc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
mm/page_alloc.c +2 -2
index 3171f4c..a368b9b 100644
@@ -4509,7 +4509,7 @@ static unsigned long __init early_calculate_totalpages(void)
  * memory. When they don't, some nodes will have more kernelcore than
  * others
  */
-static void __init find_zone_movable_pfns_for_nodes(unsigned long *movable_pfn)
+static void __init find_zone_movable_pfns_for_nodes(void)
 {
 	int i, nid;
 	unsigned long usable_startpfn;
@@ -4701,7 +4701,7 @@ void __init free_area_init_nodes(unsigned long *max_zone_pfn)
 
 	/* Find the PFNs that ZONE_MOVABLE begins at in each node */
 	memset(zone_movable_pfn, 0, sizeof(zone_movable_pfn));
-	find_zone_movable_pfns_for_nodes(zone_movable_pfn);
+	find_zone_movable_pfns_for_nodes();
 
 	/* Print out the zone ranges */
 	printk("Zone PFN ranges:\n");
Signature · 8 lines
1.7.5.4

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#1 lore raw
Quoted 3 lines · Kautuk Consul

The find_zone_movable_pfns_for_nodes() function does not utiilize the argument to it.

It could, though, if we made it to do so.

Quoted 3 lines

Removing this argument from the function prototype as well as its caller, i.e. free_area_init_nodes().

Not sure if we'd ever want it or not for other purposes, but find_zone_movable_pfns_for_nodes() could easily be made to use the passed in array rather than zone_movable_pfn in file scope directly. That seems to be why it took an argument in the first place.

Quoted 19 lines
---
 mm/page_alloc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
mm/page_alloc.c +1 -1
index 3171f4c..a368b9b 100644
@@ -4509,7 +4509,7 @@ static unsigned long __init early_calculate_totalpages(void)
  * memory. When they don't, some nodes will have more kernelcore than
  * others
  */
-static void __init find_zone_movable_pfns_for_nodes(unsigned long *movable_pfn)
+static void __init find_zone_movable_pfns_for_nodes(void)
 {
 	int i, nid;
 	unsigned long usable_startpfn;

mm/page_alloc.c void __init free_area_init_nodes(unsigned long *max_zone_pfn) · line 4707

Quoted 8 lines
mm/page_alloc.c +1 -1
@@ -4701,7 +4701,7 @@ void __init free_area_init_nodes(unsigned long *max_zone_pfn)
 
 	/* Find the PFNs that ZONE_MOVABLE begins at in each node */
 	memset(zone_movable_pfn, 0, sizeof(zone_movable_pfn));
-	find_zone_movable_pfns_for_nodes(zone_movable_pfn);
+	find_zone_movable_pfns_for_nodes();
 
 	/* Print out the zone ranges */
 	printk("Zone PFN ranges:\n");

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#2 lore raw
Quoted 8 lines · David Rientjes
Quoted 3 lines · Kautuk Consul

The find_zone_movable_pfns_for_nodes() function does not utiilize the argument to it.

It could, though, if we made it to do so.

Quoted 9 lines
Quoted 3 lines

Removing this argument from the function prototype as well as its caller, i.e. free_area_init_nodes().

Not sure if we'd ever want it or not for other purposes, but find_zone_movable_pfns_for_nodes() could easily be made to use the passed in array rather than zone_movable_pfn in file scope directly.  That seems to be why it took an argument in the first place.

No function is calling this function and I just wanted to remove the slight overhead of passing an
argument which does not get used.

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#3 lore raw
Quoted 19 lines · Kautuk Consul
Quoted 8 lines · David Rientjes
Quoted 3 lines · Kautuk Consul

The find_zone_movable_pfns_for_nodes() function does not utiilize the argument to it.

It could, though, if we made it to do so.

Quoted 9 lines
Quoted 3 lines

Removing this argument from the function prototype as well as its caller, i.e. free_area_init_nodes().

Not sure if we'd ever want it or not for other purposes, but find_zone_movable_pfns_for_nodes() could easily be made to use the passed in array rather than zone_movable_pfn in file scope directly.  That seems to be why it took an argument in the first place.

Quoted 3 lines

No function is calling this function and I just wanted to remove the slight overhead of passing an
argument which does not get used.

Sorry.. I meant : no other function oter than free_area_init_nodes() calls this function.

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>