path: root/.clang-format
diff options
authorMike Rapoport <>2020-10-13 16:57:59 -0700
committerLinus Torvalds <>2020-10-13 18:38:35 -0700
commit6e245ad4a17ab92dba63406d3f517520a86c0a80 (patch)
tree69115092fafa8c4672deb225034eb61bff608327 /.clang-format
parent87c55870f01266fe22f345a0767162f85f1cf8f1 (diff)
memblock: reduce number of parameters in for_each_mem_range()
Currently for_each_mem_range() and for_each_mem_range_rev() iterators are the most generic way to traverse memblock regions. As such, they have 8 parameters and they are hardly convenient to users. Most users choose to utilize one of their wrappers and the only user that actually needs most of the parameters is memblock itself. To avoid yet another naming for memblock iterators, rename the existing for_each_mem_range[_rev]() to __for_each_mem_range[_rev]() and add a new for_each_mem_range[_rev]() wrappers with only index, start and end parameters. The new wrapper nicely fits into init_unavailable_mem() and will be used in upcoming changes to simplify memblock traversals. Signed-off-by: Mike Rapoport <> Signed-off-by: Andrew Morton <> Acked-by: Thomas Bogendoerfer <> [MIPS] Cc: Andy Lutomirski <> Cc: Baoquan He <> Cc: Benjamin Herrenschmidt <> Cc: Borislav Petkov <> Cc: Catalin Marinas <> Cc: Christoph Hellwig <> Cc: Daniel Axtens <> Cc: Dave Hansen <> Cc: Emil Renner Berthing <> Cc: Hari Bathini <> Cc: Ingo Molnar <> Cc: Ingo Molnar <> Cc: Jonathan Cameron <> Cc: Marek Szyprowski <> Cc: Max Filippov <> Cc: Michael Ellerman <> Cc: Michal Simek <> Cc: Miguel Ojeda <> Cc: Palmer Dabbelt <> Cc: Paul Mackerras <> Cc: Paul Walmsley <> Cc: Peter Zijlstra <> Cc: Russell King <> Cc: Stafford Horne <> Cc: Thomas Gleixner <> Cc: Will Deacon <> Cc: Yoshinori Sato <> Link: Signed-off-by: Linus Torvalds <>
Diffstat (limited to '.clang-format')
1 files changed, 2 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
index badfc1ba440a..0366a3d2e561 100644
--- a/.clang-format
+++ b/.clang-format
@@ -207,7 +207,9 @@ ForEachMacros:
- 'for_each_memblock_type'
- 'for_each_memcg_cache_index'
- 'for_each_mem_pfn_range'
+ - '__for_each_mem_range'
- 'for_each_mem_range'
+ - '__for_each_mem_range_rev'
- 'for_each_mem_range_rev'
- 'for_each_migratetype_order'
- 'for_each_msi_entry'