[PATCH] for_each_zone macro
Patch from Robert Love. Attached patch implements for_each_zone(zont_t *) which is a helper macro to cleanup code of the form: for (pgdat = pgdat_list; pgdat; pgdat = pgdat->node_next) { for (i = 0; i < MAX_NR_ZONES; ++i) { zone_t * z = pgdat->node_zones + i; /* ... */ } } and replace it with: for_each_zone(zone) { /* ... */ } This patch only replaces one use of the above loop with the new macro. Pending code, however, currently in the full rmap patch uses for_each_zone more extensively.
Showing
Please register or sign in to comment