On Tue 09-01-18 14:33:03, Oscar Salvador wrote: [...] > @@ -551,13 +548,11 @@ static void init_pages_in_zone(pg_data_t *pgdat, struct zone *zone) > block_end_pfn = ALIGN(pfn + 1, pageblock_nr_pages); > block_end_pfn = min(block_end_pfn, end_pfn); > > - page = pfn_to_page(pfn); > - > for (; pfn < block_end_pfn; pfn++) { > if (!pfn_valid_within(pfn)) > continue; > > - page = pfn_to_page(pfn); > + struct page *page = pfn_to_page(pfn); > > if (page_zone(page) != zone) > continue; > @@ -580,7 +575,7 @@ static void init_pages_in_zone(pg_data_t *pgdat, struct zone *zone) > if (PageReserved(page)) > continue; > > - page_ext = lookup_page_ext(page); > + struct page_ext *page_ext = lookup_page_ext(page); > if (unlikely(!page_ext)) > continue; we do not interleave declarations with the code in the kernel. You can move those from the function scope to the loop scope and remove the pointless pfn and page initialization outside of the loop. -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>