Skip to content

Commit cd991db

Browse files
rppttorvalds
authored andcommitted
memblock: make for_each_memblock_type() iterator private
for_each_memblock_type() is not used outside mm/memblock.c, move it there from include/linux/memblock.h Signed-off-by: Mike Rapoport <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Baoquan He <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Daniel Axtens <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Emil Renner Berthing <[email protected]> Cc: Hari Bathini <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jonathan Cameron <[email protected]> Cc: Marek Szyprowski <[email protected]> Cc: Max Filippov <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Michal Simek <[email protected]> Cc: Miguel Ojeda <[email protected]> Cc: Palmer Dabbelt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Paul Walmsley <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Russell King <[email protected]> Cc: Stafford Horne <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Will Deacon <[email protected]> Cc: Yoshinori Sato <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent 4964579 commit cd991db

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

include/linux/memblock.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -552,11 +552,6 @@ static inline unsigned long memblock_region_reserved_end_pfn(const struct memblo
552552
region < (memblock.memblock_type.regions + memblock.memblock_type.cnt); \
553553
region++)
554554

555-
#define for_each_memblock_type(i, memblock_type, rgn) \
556-
for (i = 0, rgn = &memblock_type->regions[0]; \
557-
i < memblock_type->cnt; \
558-
i++, rgn = &memblock_type->regions[i])
559-
560555
extern void *alloc_large_system_hash(const char *tablename,
561556
unsigned long bucketsize,
562557
unsigned long numentries,

mm/memblock.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ struct memblock_type physmem = {
132132
};
133133
#endif
134134

135+
#define for_each_memblock_type(i, memblock_type, rgn) \
136+
for (i = 0, rgn = &memblock_type->regions[0]; \
137+
i < memblock_type->cnt; \
138+
i++, rgn = &memblock_type->regions[i])
139+
135140
int memblock_debug __initdata_memblock;
136141
static bool system_has_some_mirror __initdata_memblock = false;
137142
static int memblock_can_resize __initdata_memblock;

0 commit comments

Comments
 (0)