[PATCH v2] mm/memblock.c: make the index explicit argument of for_each_memblock_type

2017-09-13 Thread Gioh Kim
for_each_memblock_type macro function relies on idx variable defined in the caller context. Silent macro arguments are almost always wrong thing to do. They make code harder to read and easier to get wrong. Let's use an explicit iterator parameter for for_each_memblock_type and make the code more

[PATCH v2] mm/memblock.c: make the index explicit argument of for_each_memblock_type

2017-09-13 Thread Gioh Kim
for_each_memblock_type macro function relies on idx variable defined in the caller context. Silent macro arguments are almost always wrong thing to do. They make code harder to read and easier to get wrong. Let's use an explicit iterator parameter for for_each_memblock_type and make the code more