]> git.baikalelectronics.ru Git - kernel.git/commit
mm/memblock.c: make the index explicit argument of for_each_memblock_type
authorGioh Kim <gi-oh.kim@profitbricks.com>
Thu, 16 Nov 2017 01:33:42 +0000 (17:33 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 16 Nov 2017 02:21:02 +0000 (18:21 -0800)
commit66e8b438bd5c75498cfe915c4219049eaebcb869
treeb02701c72a671e8f4487c28534695be1530a0284
parentecde0f3e7f9edf8629f56b2354385dc8d0a6a24d
mm/memblock.c: make the index explicit argument of for_each_memblock_type

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 obious.  This patch is a mere cleanup and it
shouldn't introduce any functional change.

Link: http://lkml.kernel.org/r/20170913133029.28911-1-gi-oh.kim@profitbricks.com
Signed-off-by: Gioh Kim <gi-oh.kim@profitbricks.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/memblock.h
mm/memblock.c