forked from Minki/linux
include/linux/memblock.h: Clean up code for several trivial details
Correct the function parameters alignment, since original code already use both tabs and white spaces together for the incorrect parameters alignment functions. If one line can hold one statement within 80 columns, let it in one line (original code did not consider about the tabs/spaces for 2nd line when a statement is separated into 2 lines). Try to let '' aligned within one macro, since all related lines are short enough. Remove useless statement "idx = 0;", and always assign rgn within the 'for' statement. Link: http://lkml.kernel.org/r/1464904899-1714-1-git-send-email-chengang@emindsoft.com.cn Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
91537fee00
commit
ba6c19fd11
@ -163,8 +163,7 @@ void __next_reserved_mem_region(u64 *idx, phys_addr_t *out_start,
|
||||
* is initialized.
|
||||
*/
|
||||
#define for_each_reserved_mem_region(i, p_start, p_end) \
|
||||
for (i = 0UL, \
|
||||
__next_reserved_mem_region(&i, p_start, p_end); \
|
||||
for (i = 0UL, __next_reserved_mem_region(&i, p_start, p_end); \
|
||||
i != (u64)ULLONG_MAX; \
|
||||
__next_reserved_mem_region(&i, p_start, p_end))
|
||||
|
||||
@ -408,10 +407,9 @@ static inline unsigned long memblock_region_reserved_end_pfn(const struct memblo
|
||||
region++)
|
||||
|
||||
#define for_each_memblock_type(memblock_type, rgn) \
|
||||
idx = 0; \
|
||||
rgn = &memblock_type->regions[idx]; \
|
||||
for (idx = 0; idx < memblock_type->cnt; \
|
||||
idx++,rgn = &memblock_type->regions[idx])
|
||||
for (idx = 0, rgn = &memblock_type->regions[0]; \
|
||||
idx < memblock_type->cnt; \
|
||||
idx++, rgn = &memblock_type->regions[idx])
|
||||
|
||||
#ifdef CONFIG_MEMTEST
|
||||
extern void early_memtest(phys_addr_t start, phys_addr_t end);
|
||||
|
Loading…
Reference in New Issue
Block a user