[PATCH 11/17] mm/kmemleak: use node_{start,end}_pfn()

From: Cody P Schafer
Date: Tue Jan 15 2013 - 19:25:57 EST


From: Cody P Schafer <jmesmon@xxxxxxxxx>

Instead of open coding, use the exsisting node_start_pfn() and
node_end_pfn() helpers.

Signed-off-by: Cody P Schafer <cody@xxxxxxxxxxxxxxxxxx>
---
mm/kmemleak.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 752a705..83dd5fb 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -1300,9 +1300,8 @@ static void kmemleak_scan(void)
*/
lock_memory_hotplug();
for_each_online_node(i) {
- pg_data_t *pgdat = NODE_DATA(i);
- unsigned long start_pfn = pgdat->node_start_pfn;
- unsigned long end_pfn = start_pfn + pgdat->node_spanned_pages;
+ unsigned long start_pfn = node_start_pfn(i);
+ unsigned long end_pfn = node_end_pfn(i);
unsigned long pfn;

for (pfn = start_pfn; pfn < end_pfn; pfn++) {
--
1.8.0.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/